@ParametersAreNonnullByDefault @Generated(value={"Immutables.generator","OptionGroupIF"}) @Immutable public final class OptionGroup extends Object implements OptionGroupIF
OptionGroupIF.
Use the builder to create immutable instances:
OptionGroup.builder().
Use the static factory method to create immutable instances:
OptionGroup.of().
| Modifier and Type | Class and Description |
|---|---|
static class |
OptionGroup.Builder
Builds instances of type
OptionGroup. |
| Modifier and Type | Method and Description |
|---|---|
static OptionGroup.Builder |
builder()
Creates a builder for
OptionGroup. |
static OptionGroup |
copyOf(OptionGroupIF instance)
Creates an immutable copy of a
OptionGroupIF value. |
boolean |
equals(Object another)
This instance is equal to all instances of
OptionGroup that have equal attribute values. |
Text |
getLabel() |
List<Option> |
getOptions() |
int |
hashCode()
Computes a hash code from attributes:
label, options. |
static OptionGroup |
of(Text label,
Iterable<? extends Option> options)
Construct a new immutable
OptionGroup instance. |
static OptionGroup |
of(Text label,
List<Option> options)
Construct a new immutable
OptionGroup instance. |
String |
toString()
Prints the immutable value
OptionGroup with attribute values. |
OptionGroup |
withLabel(Text label)
Copy the current immutable object by setting a value for the
label attribute. |
OptionGroup |
withOptions(Iterable<? extends Option> elements)
Copy the current immutable object with elements that replace the content of
options. |
OptionGroup |
withOptions(Option... elements)
Copy the current immutable object with elements that replace the content of
options. |
public Text getLabel()
getLabel in interface OptionGroupIFlabel attributepublic List<Option> getOptions()
getOptions in interface OptionGroupIFoptions attributepublic final OptionGroup withLabel(Text label)
label attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.label - A new value for labelthis objectpublic final OptionGroup withOptions(Option... elements)
options.elements - The elements to setthis objectpublic final OptionGroup withOptions(Iterable<? extends Option> elements)
options.
A shallow reference equality check is used to prevent copying of the same value by returning this.elements - An iterable of options elements to setthis objectpublic boolean equals(@Nullable Object another)
OptionGroup that have equal attribute values.public int hashCode()
label, options.public String toString()
OptionGroup with attribute values.public static OptionGroup of(Text label, List<Option> options)
OptionGroup instance.label - The value for the label attributeoptions - The value for the options attributepublic static OptionGroup of(Text label, Iterable<? extends Option> options)
OptionGroup instance.label - The value for the label attributeoptions - The value for the options attributepublic static OptionGroup copyOf(OptionGroupIF instance)
OptionGroupIF value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance - The instance to copypublic static OptionGroup.Builder builder()
OptionGroup.Copyright © 2019. All rights reserved.