Class ImmutableConflictClique
- java.lang.Object
-
- pl.poznan.put.structure.pseudoknots.dp.ConflictClique
-
- pl.poznan.put.structure.pseudoknots.dp.ImmutableConflictClique
-
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableConflictClique extends ConflictClique
Immutable implementation ofConflictClique.Use the builder to create immutable instances:
ImmutableConflictClique.builder(). Use the static factory method to create immutable instances:ImmutableConflictClique.of().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableConflictClique.BuilderBuilds instances of typeImmutableConflictClique.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableConflictClique.Builderbuilder()Creates a builder forImmutableConflictClique.static ImmutableConflictCliquecopyOf(ConflictClique instance)Creates an immutable copy of aConflictCliquevalue.booleanequals(Object another)This instance is equal to all instances ofImmutableConflictCliquethat have equal attribute values.inthashCode()Computes a hash code from attributes:regions.static ImmutableConflictCliqueof(Iterable<? extends Region> regions)Construct a new immutableConflictCliqueinstance.static ImmutableConflictCliqueof(Set<Region> regions)Construct a new immutableConflictCliqueinstance.Set<Region>regions()protected List<Integer>sortedEndpoints()StringtoString()Prints the immutable valueConflictCliquewith attribute values.ImmutableConflictCliquewithRegions(Iterable<? extends Region> elements)Copy the current immutable object with elements that replace the content ofregions.ImmutableConflictCliquewithRegions(Region... elements)Copy the current immutable object with elements that replace the content ofregions.-
Methods inherited from class pl.poznan.put.structure.pseudoknots.dp.ConflictClique
endpoint, endpointCount, findRegion, indexOfEndpoint, size
-
-
-
-
Method Detail
-
regions
public Set<Region> regions()
- Specified by:
regionsin classConflictClique- Returns:
- The set of regions in this conflict clique.
-
withRegions
public final ImmutableConflictClique withRegions(Region... elements)
Copy the current immutable object with elements that replace the content ofregions.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withRegions
public final ImmutableConflictClique withRegions(Iterable<? extends Region> elements)
Copy the current immutable object with elements that replace the content ofregions. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of regions elements to set- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableConflictCliquethat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:regions.
-
toString
public String toString()
Prints the immutable valueConflictCliquewith attribute values.
-
sortedEndpoints
protected List<Integer> sortedEndpoints()
Returns a lazily initialized value of the
sortedEndpointsattribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.- Overrides:
sortedEndpointsin classConflictClique- Returns:
- A lazily initialized value of the
sortedEndpointsattribute
-
of
public static ImmutableConflictClique of(Set<Region> regions)
Construct a new immutableConflictCliqueinstance.- Parameters:
regions- The value for theregionsattribute- Returns:
- An immutable ConflictClique instance
-
of
public static ImmutableConflictClique of(Iterable<? extends Region> regions)
Construct a new immutableConflictCliqueinstance.- Parameters:
regions- The value for theregionsattribute- Returns:
- An immutable ConflictClique instance
-
copyOf
public static ImmutableConflictClique copyOf(ConflictClique instance)
Creates an immutable copy of aConflictCliquevalue. 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 ConflictClique instance
-
builder
public static ImmutableConflictClique.Builder builder()
Creates a builder forImmutableConflictClique.ImmutableConflictClique.builder() .addRegions|addAllRegions(pl.poznan.put.structure.pseudoknots.Region) //regionselements .build();- Returns:
- A new ImmutableConflictClique builder
-
-