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 class
Builds instances of typeImmutableConflictGraph
. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forImmutableConflictGraph
.static ImmutableConflictGraph
copyOf
(ConflictGraph instance) Creates an immutable copy of aConflictGraph
value.boolean
This instance is equal to all instances ofImmutableConflictGraph
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:regions
.static ImmutableConflictGraph
Construct a new immutableConflictGraph
instance.static ImmutableConflictGraph
Construct a new immutableConflictGraph
instance.regions()
toString()
Prints the immutable valueConflictGraph
with attribute values.final ImmutableConflictGraph
withRegions
(Iterable<? extends Region> elements) Copy the current immutable object with elements that replace the content ofregions
.final ImmutableConflictGraph
withRegions
(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:
regions
in classConflictGraph
- Returns:
- The value of the
regions
attribute
-
withRegions
Copy the current immutable object with elements that replace the content ofregions
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
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
this
object
-
equals
This instance is equal to all instances ofImmutableConflictGraph
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:regions
. -
toString
Prints the immutable valueConflictGraph
with attribute values. -
conflicts
Returns a lazily initialized value of the
conflicts
attribute. 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:
conflicts
in classConflictGraph
- Returns:
- A lazily initialized value of the
conflicts
attribute
-
of
Construct a new immutableConflictGraph
instance.- Parameters:
regions
- The value for theregions
attribute- Returns:
- An immutable ConflictGraph instance
-
of
Construct a new immutableConflictGraph
instance.- Parameters:
regions
- The value for theregions
attribute- Returns:
- An immutable ConflictGraph instance
-
copyOf
Creates an immutable copy of aConflictGraph
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 ConflictGraph instance
-
builder
Creates a builder forImmutableConflictGraph
.ImmutableConflictGraph.builder() .addRegions|addAllRegions(pl.poznan.put.structure.pseudoknots.Region) //
regions
elements .build();- Returns:
- A new ImmutableConflictGraph builder
-