Package pl.poznan.put.structure.formats
Class ImmutableBpSeq
- java.lang.Object
-
- pl.poznan.put.structure.formats.BpSeq
-
- pl.poznan.put.structure.formats.ImmutableBpSeq
-
- All Implemented Interfaces:
Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableBpSeq extends BpSeq
Immutable implementation ofBpSeq.Use the builder to create immutable instances:
ImmutableBpSeq.builder(). Use the static factory method to create immutable instances:ImmutableBpSeq.of().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableBpSeq.BuilderBuilds instances of typeImmutableBpSeq.-
Nested classes/interfaces inherited from class pl.poznan.put.structure.formats.BpSeq
BpSeq.Entry
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableBpSeq.Builderbuilder()Creates a builder forImmutableBpSeq.static ImmutableBpSeqcopyOf(BpSeq instance)Creates an immutable copy of aBpSeqvalue.SortedSet<BpSeq.Entry>entries()booleanequals(Object another)This instance is equal to all instances ofImmutableBpSeqthat have equal attribute values.inthashCode()Computes a hash code from attributes:entries.static ImmutableBpSeqof(Iterable<? extends BpSeq.Entry> entries)Construct a new immutableBpSeqinstance.static ImmutableBpSeqof(SortedSet<BpSeq.Entry> entries)Construct a new immutableBpSeqinstance.ImmutableBpSeqwithEntries(Iterable<? extends BpSeq.Entry> elements)Copy the current immutable object with elements that replace the content ofentries.ImmutableBpSeqwithEntries(BpSeq.Entry... elements)Copy the current immutable object with elements that replace the content ofentries.-
Methods inherited from class pl.poznan.put.structure.formats.BpSeq
fromBasePairs, fromCt, fromDotBracket, fromString, hasAnyPair, paired, sequence, size, toString, validate, withoutIsolatedPairs, withoutPair
-
-
-
-
Method Detail
-
entries
public SortedSet<BpSeq.Entry> entries()
-
withEntries
public final ImmutableBpSeq withEntries(BpSeq.Entry... 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 ImmutableBpSeq withEntries(Iterable<? extends BpSeq.Entry> 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 ofImmutableBpSeqthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:entries.
-
of
public static ImmutableBpSeq of(SortedSet<BpSeq.Entry> entries)
Construct a new immutableBpSeqinstance.- Parameters:
entries- The value for theentriesattribute- Returns:
- An immutable BpSeq instance
-
of
public static ImmutableBpSeq of(Iterable<? extends BpSeq.Entry> entries)
Construct a new immutableBpSeqinstance.- Parameters:
entries- The value for theentriesattribute- Returns:
- An immutable BpSeq instance
-
copyOf
public static ImmutableBpSeq copyOf(BpSeq instance)
Creates an immutable copy of aBpSeqvalue. 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 BpSeq instance
-
builder
public static ImmutableBpSeq.Builder builder()
Creates a builder forImmutableBpSeq.ImmutableBpSeq.builder() .addEntries|addAllEntries(pl.poznan.put.structure.formats.BpSeq.Entry) //entrieselements .build();- Returns:
- A new ImmutableBpSeq builder
-
-