Package pl.poznan.put.structure.formats
Class ImmutableEntry
java.lang.Object
pl.poznan.put.structure.formats.BpSeq.Entry
pl.poznan.put.structure.formats.ImmutableEntry
- All Implemented Interfaces:
Serializable,Comparable<BpSeq.Entry>
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ImmutableEntry
extends BpSeq.Entry
Immutable implementation of
BpSeq.Entry.
Use the builder to create immutable instances:
ImmutableEntry.builder().
Use the static factory method to create immutable instances:
ImmutableEntry.of().
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableEntry.Builderbuilder()Creates a builder forImmutableEntry.comment()static ImmutableEntrycopyOf(BpSeq.Entry instance) Creates an immutable copy of aBpSeq.Entryvalue.booleanThis instance is equal to all instances ofImmutableEntrythat have equal attribute values.inthashCode()Computes a hash code from attributes:index,seq,pair,comment.intindex()static ImmutableEntryof(int index, char seq, int pair) Construct a new immutableEntryinstance.intpair()charseq()final ImmutableEntrywithComment(String value) Copy the current immutable object by setting a value for thecommentattribute.final ImmutableEntrywithIndex(int value) Copy the current immutable object by setting a value for theindexattribute.final ImmutableEntrywithPair(int value) Copy the current immutable object by setting a value for thepairattribute.final ImmutableEntrywithSeq(char value) Copy the current immutable object by setting a value for theseqattribute.Methods inherited from class pl.poznan.put.structure.formats.BpSeq.Entry
compareTo, contains, fromString, isPaired, length, toString
-
Method Details
-
index
public int index()- Specified by:
indexin classBpSeq.Entry- Returns:
- The value of index column.
-
seq
public char seq()- Specified by:
seqin classBpSeq.Entry- Returns:
- The value of sequence column.
-
pair
public int pair()- Specified by:
pairin classBpSeq.Entry- Returns:
- The value of pair column.
-
comment
- Overrides:
commentin classBpSeq.Entry- Returns:
- The optional comment.
-
withIndex
Copy the current immutable object by setting a value for theindexattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for index- Returns:
- A modified copy of the
thisobject
-
withSeq
Copy the current immutable object by setting a value for theseqattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for seq- Returns:
- A modified copy of the
thisobject
-
withPair
Copy the current immutable object by setting a value for thepairattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for pair- Returns:
- A modified copy of the
thisobject
-
withComment
Copy the current immutable object by setting a value for thecommentattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for comment- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableEntrythat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:index,seq,pair,comment. -
of
Construct a new immutableEntryinstance.- Parameters:
index- The value for theindexattributeseq- The value for theseqattributepair- The value for thepairattribute- Returns:
- An immutable Entry instance
-
copyOf
Creates an immutable copy of aBpSeq.Entryvalue. 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 Entry instance
-
builder
Creates a builder forImmutableEntry.ImmutableEntry.builder() .index(int) // requiredindex.seq(char) // requiredseq.pair(int) // requiredpair.comment(String) // optionalcomment.build();- Returns:
- A new ImmutableEntry builder
-