Package pl.poznan.put.structure.formats
Class ImmutableCt
- java.lang.Object
-
- pl.poznan.put.structure.formats.Ct
-
- pl.poznan.put.structure.formats.ImmutableCt
-
- All Implemented Interfaces:
Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableCt extends Ct
Immutable implementation ofCt.Use the builder to create immutable instances:
ImmutableCt.builder(). Use the static factory method to create immutable instances:ImmutableCt.of().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableCt.BuilderBuilds instances of typeImmutableCt.-
Nested classes/interfaces inherited from class pl.poznan.put.structure.formats.Ct
Ct.ExtendedEntry
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableCt.Builderbuilder()Creates a builder forImmutableCt.static ImmutableCtcopyOf(Ct instance)Creates an immutable copy of aCtvalue.SortedSet<Ct.ExtendedEntry>entries()booleanequals(Object another)This instance is equal to all instances ofImmutableCtthat have equal attribute values.inthashCode()Computes a hash code from attributes:entries.static ImmutableCtof(Iterable<? extends Ct.ExtendedEntry> entries)Construct a new immutableCtinstance.static ImmutableCtof(SortedSet<Ct.ExtendedEntry> entries)Construct a new immutableCtinstance.ImmutableCtwithEntries(Iterable<? extends Ct.ExtendedEntry> elements)Copy the current immutable object with elements that replace the content ofentries.ImmutableCtwithEntries(Ct.ExtendedEntry... elements)Copy the current immutable object with elements that replace the content ofentries.-
Methods inherited from class pl.poznan.put.structure.formats.Ct
fromBpSeq, fromBpSeqAndPdbModel, fromDotBracket, fromString, strandCount, toString, validate, withoutIsolatedPairs, withoutPair
-
-
-
-
Method Detail
-
entries
public SortedSet<Ct.ExtendedEntry> entries()
-
withEntries
public final ImmutableCt withEntries(Ct.ExtendedEntry... elements)
Copy the current immutable object with elements that replace the content ofentries.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withEntries
public final ImmutableCt withEntries(Iterable<? extends Ct.ExtendedEntry> elements)
Copy the current immutable object with elements that replace the content ofentries. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of entries elements to set- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableCtthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:entries.
-
of
public static ImmutableCt of(SortedSet<Ct.ExtendedEntry> entries)
Construct a new immutableCtinstance.- Parameters:
entries- The value for theentriesattribute- Returns:
- An immutable Ct instance
-
of
public static ImmutableCt of(Iterable<? extends Ct.ExtendedEntry> entries)
Construct a new immutableCtinstance.- Parameters:
entries- The value for theentriesattribute- Returns:
- An immutable Ct instance
-
copyOf
public static ImmutableCt copyOf(Ct instance)
Creates an immutable copy of aCtvalue. 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 Ct instance
-
builder
public static ImmutableCt.Builder builder()
Creates a builder forImmutableCt.ImmutableCt.builder() .addEntries|addAllEntries(pl.poznan.put.structure.formats.Ct.ExtendedEntry) //entrieselements .build();- Returns:
- A new ImmutableCt builder
-
-