@Generated(value="org.immutables.processor.ProxyProcessor") public final class ImmutablePairTypeInfo<FIRST,SECOND> extends Pair.PairTypeInfo<FIRST,SECOND>
Pair.PairTypeInfo.
Use the builder to create immutable instances:
ImmutablePairTypeInfo.builder().
Use the static factory method to create immutable instances:
ImmutablePairTypeInfo.of().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutablePairTypeInfo.Builder<FIRST,SECOND>
Builds instances of type
ImmutablePairTypeInfo. |
| Modifier and Type | Method and Description |
|---|---|
static <FIRST,SECOND> |
builder()
Creates a builder for
ImmutablePairTypeInfo. |
static <FIRST,SECOND> |
copyOf(Pair.PairTypeInfo<FIRST,SECOND> instance)
Creates an immutable copy of a
Pair.PairTypeInfo value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutablePairTypeInfo that have equal attribute values. |
TypeInfo<FIRST> |
first() |
int |
hashCode()
Computes a hash code from attributes:
first, second. |
static <FIRST,SECOND> |
of(TypeInfo<FIRST> first,
TypeInfo<SECOND> second)
Construct a new immutable
PairTypeInfo instance. |
TypeInfo<SECOND> |
second() |
String |
toString()
Prints the immutable value
PairTypeInfo with attribute values. |
ImmutablePairTypeInfo<FIRST,SECOND> |
withFirst(TypeInfo<FIRST> value)
Copy the current immutable object by setting a value for the
first attribute. |
ImmutablePairTypeInfo<FIRST,SECOND> |
withSecond(TypeInfo<SECOND> value)
Copy the current immutable object by setting a value for the
second attribute. |
cast, isInstancepublic TypeInfo<FIRST> first()
first in class Pair.PairTypeInfo<FIRST,SECOND>first attributepublic TypeInfo<SECOND> second()
second in class Pair.PairTypeInfo<FIRST,SECOND>second attributepublic final ImmutablePairTypeInfo<FIRST,SECOND> withFirst(TypeInfo<FIRST> value)
first attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for firstthis objectpublic final ImmutablePairTypeInfo<FIRST,SECOND> withSecond(TypeInfo<SECOND> value)
second attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for secondthis objectpublic boolean equals(Object another)
ImmutablePairTypeInfo that have equal attribute values.public int hashCode()
first, second.public String toString()
PairTypeInfo with attribute values.public static <FIRST,SECOND> ImmutablePairTypeInfo<FIRST,SECOND> of(TypeInfo<FIRST> first, TypeInfo<SECOND> second)
PairTypeInfo instance.FIRST - generic parameter FIRSTSECOND - generic parameter SECONDfirst - The value for the first attributesecond - The value for the second attributepublic static <FIRST,SECOND> ImmutablePairTypeInfo<FIRST,SECOND> copyOf(Pair.PairTypeInfo<FIRST,SECOND> instance)
Pair.PairTypeInfo value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.FIRST - generic parameter FIRSTSECOND - generic parameter SECONDinstance - The instance to copypublic static <FIRST,SECOND> ImmutablePairTypeInfo.Builder<FIRST,SECOND> builder()
ImmutablePairTypeInfo.
ImmutablePairTypeInfo.<FIRST, SECOND>builder()
.first(de.flapdoodle.reflection.TypeInfo<FIRST>) // required first
.second(de.flapdoodle.reflection.TypeInfo<SECOND>) // required second
.build();
FIRST - generic parameter FIRSTSECOND - generic parameter SECONDCopyright © 2023. All rights reserved.