Class ImmutableConflictGraph
java.lang.Object
pl.poznan.put.structure.pseudoknots.ConflictGraph
pl.poznan.put.structure.pseudoknots.ImmutableConflictGraph
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ImmutableConflictGraph
extends ConflictGraph
Immutable implementation of
ConflictGraph.
Use the builder to create immutable instances:
ImmutableConflictGraph.builder().
Use the static factory method to create immutable instances:
ImmutableConflictGraph.of().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableConflictGraph. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableConflictGraph.static ImmutableConflictGraphcopyOf(ConflictGraph instance) Creates an immutable copy of aConflictGraphvalue.booleanThis instance is equal to all instances ofImmutableConflictGraphthat have equal attribute values.inthashCode()Computes a hash code from attributes:regions.static ImmutableConflictGraphConstruct a new immutableConflictGraphinstance.static ImmutableConflictGraphConstruct a new immutableConflictGraphinstance.regions()toString()Prints the immutable valueConflictGraphwith attribute values.final ImmutableConflictGraphwithRegions(Iterable<? extends Region> elements) Copy the current immutable object with elements that replace the content ofregions.final ImmutableConflictGraphwithRegions(Region... elements) Copy the current immutable object with elements that replace the content ofregions.Methods inherited from class pl.poznan.put.structure.pseudoknots.ConflictGraph
conflictCliques, conflictsWith, hasConflicts, hasConflicts, isConflicting, regionsWithConflicts, removeRegion, simplified
-
Method Details
-
regions
- Specified by:
regionsin classConflictGraph- Returns:
- The value of the
regionsattribute
-
withRegions
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
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
This instance is equal to all instances ofImmutableConflictGraphthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:regions. -
toString
Prints the immutable valueConflictGraphwith attribute values. -
conflicts
Returns a lazily initialized value of the
conflictsattribute. 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:
conflictsin classConflictGraph- Returns:
- A lazily initialized value of the
conflictsattribute
-
of
Construct a new immutableConflictGraphinstance.- Parameters:
regions- The value for theregionsattribute- Returns:
- An immutable ConflictGraph instance
-
of
Construct a new immutableConflictGraphinstance.- Parameters:
regions- The value for theregionsattribute- Returns:
- An immutable ConflictGraph instance
-
copyOf
Creates an immutable copy of aConflictGraphvalue. 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 ConflictGraph instance
-
builder
Creates a builder forImmutableConflictGraph.ImmutableConflictGraph.builder() .addRegions|addAllRegions(pl.poznan.put.structure.pseudoknots.Region) //regionselements .build();- Returns:
- A new ImmutableConflictGraph builder
-