Package pl.poznan.put.external.dssr
Class ImmutablePair
java.lang.Object
pl.poznan.put.external.dssr.ImmutablePair
- All Implemented Interfaces:
Pair
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ImmutablePair
extends Object
implements Pair
Immutable implementation of
Pair
.
Use the builder to create immutable instances:
ImmutablePair.builder()
.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutablePair.Builder
builder()
Creates a builder forImmutablePair
.static ImmutablePair
Creates an immutable copy of aPair
value.boolean
This instance is equal to all instances ofImmutablePair
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:nt1
,nt2
,saenger
,lw
.lw()
nt1()
nt2()
saenger()
toString()
Prints the immutable valuePair
with attribute values.final ImmutablePair
Copy the current immutable object by setting a value for thelw
attribute.final ImmutablePair
Copy the current immutable object by setting a value for thent1
attribute.final ImmutablePair
Copy the current immutable object by setting a value for thent2
attribute.final ImmutablePair
withSaenger
(String value) Copy the current immutable object by setting a value for thesaenger
attribute.
-
Method Details
-
nt1
-
nt2
-
saenger
-
lw
-
withNt1
Copy the current immutable object by setting a value for thent1
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for nt1- Returns:
- A modified copy of the
this
object
-
withNt2
Copy the current immutable object by setting a value for thent2
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for nt2- Returns:
- A modified copy of the
this
object
-
withSaenger
Copy the current immutable object by setting a value for thesaenger
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for saenger- Returns:
- A modified copy of the
this
object
-
withLw
Copy the current immutable object by setting a value for thelw
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for lw- Returns:
- A modified copy of the
this
object
-
equals
This instance is equal to all instances ofImmutablePair
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:nt1
,nt2
,saenger
,lw
. -
toString
Prints the immutable valuePair
with attribute values. -
copyOf
Creates an immutable copy of aPair
value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance
- The instance to copy- Returns:
- A copied immutable Pair instance
-
builder
Creates a builder forImmutablePair
.ImmutablePair.builder() .nt1(String) // required
nt1
.nt2(String) // requirednt2
.saenger(String) // requiredsaenger
.lw(String) // requiredlw
.build();- Returns:
- A new ImmutablePair builder
-