@Generated(value={"Immutables.generator","NamedTypeAndState<T>"}) public final class ImmutableNamedTypeAndState<T> extends Object implements NamedTypeAndState<T>
NamedTypeAndState.
Use the builder to create immutable instances:
ImmutableNamedTypeAndState.<T>builder().
Use the static factory method to create immutable instances:
ImmutableNamedTypeAndState.<T>of().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableNamedTypeAndState.Builder<T>
Builds instances of type
ImmutableNamedTypeAndState. |
| Modifier and Type | Method and Description |
|---|---|
static <T> ImmutableNamedTypeAndState.Builder<T> |
builder()
Creates a builder for
ImmutableNamedTypeAndState. |
static <T> ImmutableNamedTypeAndState<T> |
copyOf(NamedTypeAndState<T> instance)
Creates an immutable copy of a
NamedTypeAndState value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableNamedTypeAndState that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
type, state. |
static <T> ImmutableNamedTypeAndState<T> |
of(NamedType<T> type,
State<T> state)
Construct a new immutable
NamedTypeAndState instance. |
State<T> |
state() |
String |
toString()
Prints the immutable value
NamedTypeAndState with attribute values. |
NamedType<T> |
type() |
ImmutableNamedTypeAndState<T> |
withState(State<T> value)
Copy the current immutable object by setting a value for the
state attribute. |
ImmutableNamedTypeAndState<T> |
withType(NamedType<T> value)
Copy the current immutable object by setting a value for the
type attribute. |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitasTypeAndValuepublic NamedType<T> type()
type in interface NamedTypeAndState<T>type attributepublic State<T> state()
state in interface NamedTypeAndState<T>state attributepublic final ImmutableNamedTypeAndState<T> withType(NamedType<T> value)
type attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for typethis objectpublic final ImmutableNamedTypeAndState<T> withState(State<T> value)
state attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for statethis objectpublic boolean equals(Object another)
ImmutableNamedTypeAndState that have equal attribute values.public int hashCode()
type, state.public String toString()
NamedTypeAndState with attribute values.public static <T> ImmutableNamedTypeAndState<T> of(NamedType<T> type, State<T> state)
NamedTypeAndState instance.of in interface NamedTypeAndState<T>type - The value for the type attributestate - The value for the state attributepublic static <T> ImmutableNamedTypeAndState<T> copyOf(NamedTypeAndState<T> instance)
NamedTypeAndState value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.T - generic parameter Tinstance - The instance to copypublic static <T> ImmutableNamedTypeAndState.Builder<T> builder()
ImmutableNamedTypeAndState.T - generic parameter TCopyright © 2017. All rights reserved.