Class RepresentationHint.Builder<V>

    • Method Detail

      • identifier

        public abstract RepresentationHint.Builder<Videntifier​(java.lang.String identifier)
        Set the identifier to refer to this hint.
        Parameters:
        identifier - hint identifier
        Returns:
        this builder
        Since:
        4.0.0
      • valueType

        public final RepresentationHint.Builder<VvalueType​(java.lang.Class<V> valueType)
        Set the type used for this node's value.

        Raw types are forbidden.

        Parameters:
        valueType - the value type
        Returns:
        this builder
        Since:
        4.0.0
      • valueType

        public abstract RepresentationHint.Builder<VvalueType​(io.leangen.geantyref.TypeToken<V> valueType)
        Set the type used for this node's value.

        Raw types are forbidden.

        Parameters:
        valueType - the value type
        Returns:
        this builder
        Since:
        4.0.0
      • defaultValue

        public abstract RepresentationHint.Builder<VdefaultValue​(@Nullable V defaultValue)
        Set the default value when this hint is not present in the hierarchy.

        This defaults to null.

        Parameters:
        defaultValue - value to return on gets
        Returns:
        this builder
        Since:
        4.0.0
      • build

        public abstract RepresentationHint<Vbuild()
        Create a new hint from the provided options.

        The identifier and valueType must have been set to build a complete hint.

        Returns:
        a new representation hint
        Since:
        4.0.0