@ParametersAreNonnullByDefault @Generated(value={"Immutables.generator","SectionIF"}) @Immutable public final class Section extends Object implements SectionIF
SectionIF.
Use the builder to create immutable instances:
Section.builder().
Use the static factory method to create immutable instances:
Section.of().
| Modifier and Type | Class and Description |
|---|---|
static class |
Section.Builder
Builds instances of type
Section. |
| Modifier and Type | Method and Description |
|---|---|
static Section.Builder |
builder()
Creates a builder for
Section. |
static Section |
copyOf(SectionIF instance)
Creates an immutable copy of a
SectionIF value. |
boolean |
equals(Object another)
This instance is equal to all instances of
Section that have equal attribute values. |
Optional<BlockElement> |
getAccessory() |
Optional<String> |
getBlockId() |
List<Text> |
getFields() |
Text |
getText() |
String |
getType() |
int |
hashCode()
Computes a hash code from attributes:
type, text, fields, accessory, blockId. |
static Section |
of(Text text)
Construct a new immutable
Section instance. |
String |
toString()
Prints the immutable value
Section with attribute values. |
Section |
withAccessory(BlockElement value)
Copy the current immutable object by setting a present value for the optional
accessory attribute. |
Section |
withAccessory(Optional<BlockElement> optional)
Copy the current immutable object by setting an optional value for the
accessory attribute. |
Section |
withBlockId(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
blockId attribute. |
Section |
withBlockId(String value)
Copy the current immutable object by setting a present value for the optional
blockId attribute. |
Section |
withFields(Iterable<? extends Text> elements)
Copy the current immutable object with elements that replace the content of
fields. |
Section |
withFields(Text... elements)
Copy the current immutable object with elements that replace the content of
fields. |
Section |
withText(Text text)
Copy the current immutable object by setting a value for the
text attribute. |
public String getType()
public Text getText()
public Optional<BlockElement> getAccessory()
getAccessory in interface SectionIFaccessory attributepublic Optional<String> getBlockId()
getBlockId in interface BlockblockId attributepublic final Section withText(Text text)
text attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.text - A new value for textthis objectpublic final Section withFields(Text... elements)
fields.elements - The elements to setthis objectpublic final Section withFields(Iterable<? extends Text> elements)
fields.
A shallow reference equality check is used to prevent copying of the same value by returning this.elements - An iterable of fields elements to setthis objectpublic final Section withAccessory(@Nullable BlockElement value)
accessory attribute.value - The value for accessory, null is accepted as java.util.Optional.empty()this objectpublic final Section withAccessory(Optional<BlockElement> optional)
accessory attribute.
A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.optional - A value for accessorythis objectpublic final Section withBlockId(@Nullable String value)
blockId attribute.value - The value for blockId, null is accepted as java.util.Optional.empty()this objectpublic final Section withBlockId(Optional<String> optional)
blockId attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for blockIdthis objectpublic boolean equals(@Nullable Object another)
Section that have equal attribute values.public int hashCode()
type, text, fields, accessory, blockId.public String toString()
Section with attribute values.public static Section of(Text text)
Section instance.text - The value for the text attributepublic static Section copyOf(SectionIF instance)
SectionIF 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 Section.Builder builder()
Section.Copyright © 2019. All rights reserved.