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.Builderbuilder()Creates a builder forImmutablePair.static ImmutablePairCreates an immutable copy of aPairvalue.booleanThis instance is equal to all instances ofImmutablePairthat have equal attribute values.inthashCode()Computes a hash code from attributes:nt1,nt2,saenger,lw.lw()nt1()nt2()saenger()toString()Prints the immutable valuePairwith attribute values.final ImmutablePairCopy the current immutable object by setting a value for thelwattribute.final ImmutablePairCopy the current immutable object by setting a value for thent1attribute.final ImmutablePairCopy the current immutable object by setting a value for thent2attribute.final ImmutablePairwithSaenger(String value) Copy the current immutable object by setting a value for thesaengerattribute.
-
Method Details
-
nt1
-
nt2
-
saenger
-
lw
-
withNt1
Copy the current immutable object by setting a value for thent1attribute. 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
thisobject
-
withNt2
Copy the current immutable object by setting a value for thent2attribute. 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
thisobject
-
withSaenger
Copy the current immutable object by setting a value for thesaengerattribute. 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
thisobject
-
withLw
Copy the current immutable object by setting a value for thelwattribute. 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
thisobject
-
equals
This instance is equal to all instances ofImmutablePairthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:nt1,nt2,saenger,lw. -
toString
Prints the immutable valuePairwith attribute values. -
copyOf
Creates an immutable copy of aPairvalue. 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) // requirednt1.nt2(String) // requirednt2.saenger(String) // requiredsaenger.lw(String) // requiredlw.build();- Returns:
- A new ImmutablePair builder
-