Class RepresentationHint.Builder<V>

    • Method Detail

      • valueType

        public final RepresentationHint.Builder<VvalueType​(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​(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