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 ofPair.Use the builder to create immutable instances:
ImmutablePair.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutablePair.BuilderBuilds instances of typeImmutablePair.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutablePair.Builderbuilder()Creates a builder forImmutablePair.static ImmutablePaircopyOf(Pair instance)Creates an immutable copy of aPairvalue.booleanequals(Object another)This instance is equal to all instances ofImmutablePairthat have equal attribute values.inthashCode()Computes a hash code from attributes:nt1,nt2,saenger,lw.Stringlw()Stringnt1()Stringnt2()Stringsaenger()StringtoString()Prints the immutable valuePairwith attribute values.ImmutablePairwithLw(String value)Copy the current immutable object by setting a value for thelwattribute.ImmutablePairwithNt1(String value)Copy the current immutable object by setting a value for thent1attribute.ImmutablePairwithNt2(String value)Copy the current immutable object by setting a value for thent2attribute.ImmutablePairwithSaenger(String value)Copy the current immutable object by setting a value for thesaengerattribute.
-
-
-
Method Detail
-
saenger
public String saenger()
-
withNt1
public final ImmutablePair withNt1(String value)
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
public final ImmutablePair withNt2(String value)
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
public final ImmutablePair withSaenger(String value)
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
public final ImmutablePair withLw(String value)
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
public boolean equals(@Nullable Object another)
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
public String toString()
Prints the immutable valuePairwith attribute values.
-
copyOf
public static ImmutablePair copyOf(Pair instance)
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
public static ImmutablePair.Builder 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
-
-