Package io.fluentlenium.core.label
Class FluentLabelImpl<T>
java.lang.Object
io.fluentlenium.core.label.FluentLabelImpl<T>
- Type Parameters:
T-thisclass to chain method calls
- All Implemented Interfaces:
FluentLabel<T>,FluentLabelProvider
Apply label and label hints to element.
-
Constructor Summary
ConstructorsConstructorDescriptionFluentLabelImpl(T reference, Supplier<String> defaultLabelSupplier) Creates a new fluent label. -
Method Summary
Modifier and TypeMethodDescriptiongetLabel()Get the defined label.String[]Get the defined label hints.toString()Apply a label that will be displayed as the representation of this object for error message.withLabelHint(String... labelHint) Add a label hint that will be appended to the representation of this object for error message.
-
Constructor Details
-
FluentLabelImpl
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 Details
-
withLabel
Description copied from interface:FluentLabelApply a label that will be displayed as the representation of this object for error message.- Specified by:
withLabelin interfaceFluentLabel<T>- Parameters:
label- label to use- Returns:
- reference to this object to chain calls
-
getLabel
Get the defined label.- Specified by:
getLabelin interfaceFluentLabelProvider- Returns:
- defined value
-
withLabelHint
Description copied from interface:FluentLabelAdd a label hint that will be appended to the representation of this object for error message.- Specified by:
withLabelHintin interfaceFluentLabel<T>- Parameters:
labelHint- label hints to add- Returns:
- reference to this object to chain calls
-
getLabelHints
Get the defined label hints.- Specified by:
getLabelHintsin interfaceFluentLabelProvider- Returns:
- array of label hints
-
toString
-