@ParametersAreNonnullByDefault @Generated(value={"Immutables.generator","FieldIF"}) @Immutable public final class Field extends Object implements FieldIF
FieldIF.
Use the builder to create immutable instances:
Field.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
Field.Builder
Builds instances of type
Field. |
| Modifier and Type | Method and Description |
|---|---|
static Field.Builder |
builder()
Creates a builder for
Field. |
static Field |
copyOf(FieldIF instance)
Creates an immutable copy of a
FieldIF value. |
boolean |
equals(Object another)
This instance is equal to all instances of
Field that have equal attribute values. |
Optional<String> |
getTitle() |
String |
getValue() |
int |
hashCode()
Computes a hash code from attributes:
title, value, isShort. |
boolean |
isShort() |
String |
toString()
Prints the immutable value
Field with attribute values. |
Field |
withIsShort(boolean isShort)
Copy the current immutable object by setting a value for the
isShort attribute. |
Field |
withTitle(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
title attribute. |
Field |
withTitle(String value)
Copy the current immutable object by setting a present value for the optional
title attribute. |
Field |
withValue(String value)
Copy the current immutable object by setting a value for the
value attribute. |
public String getValue()
public boolean isShort()
public final Field withTitle(@Nullable String value)
title attribute.value - The value for title, null is accepted as java.util.Optional.empty()this objectpublic final Field withTitle(Optional<String> optional)
title attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for titlethis objectpublic final Field withValue(String value)
value attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for valuethis objectpublic final Field withIsShort(boolean isShort)
isShort attribute.
A value equality check is used to prevent copying of the same value by returning this.isShort - A new value for isShortthis objectpublic boolean equals(@Nullable Object another)
Field that have equal attribute values.public int hashCode()
title, value, isShort.public String toString()
Field with attribute values.public static Field copyOf(FieldIF instance)
FieldIF 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 Field.Builder builder()
Field.Copyright © 2019. All rights reserved.