Class FluentLabelImpl<T>

    • Constructor Summary

      Constructors 
      Constructor Description
      FluentLabelImpl​(T reference, java.util.function.Supplier<java.lang.String> defaultLabelSupplier)
      Creates a new fluent label.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getLabel()
      Get the defined label.
      java.lang.String[] getLabelHints()
      Get the defined label hints.
      java.lang.String toString()  
      T withLabel​(java.lang.String label)
      Apply a label that will be displayed as the representation of this object for error message.
      T withLabelHint​(java.lang.String... labelHint)
      Add a label hint that will be appended to the representation of this object for error message.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • FluentLabelImpl

        public FluentLabelImpl​(T reference,
                               java.util.function.Supplier<java.lang.String> defaultLabelSupplier)
        Creates a new fluent label.
        Parameters:
        reference - object reference to chain methods calls.
        defaultLabelSupplier - supplier for default label to display when no label is defined.
    • Method Detail

      • withLabel

        public T withLabel​(java.lang.String label)
        Description copied from interface: FluentLabel
        Apply a label that will be displayed as the representation of this object for error message.
        Specified by:
        withLabel in interface FluentLabel<T>
        Parameters:
        label - label to use
        Returns:
        reference to this object to chain calls
      • getLabel

        public java.lang.String getLabel()
        Get the defined label.
        Specified by:
        getLabel in interface FluentLabelProvider
        Returns:
        defined value
      • withLabelHint

        public T withLabelHint​(java.lang.String... labelHint)
        Description copied from interface: FluentLabel
        Add a label hint that will be appended to the representation of this object for error message.
        Specified by:
        withLabelHint in interface FluentLabel<T>
        Parameters:
        labelHint - label hints to add
        Returns:
        reference to this object to chain calls
      • getLabelHints

        public java.lang.String[] getLabelHints()
        Get the defined label hints.
        Specified by:
        getLabelHints in interface FluentLabelProvider
        Returns:
        array of label hints
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object