Package pl.poznan.put.structure.formats
Class BpSeq.Entry
java.lang.Object
pl.poznan.put.structure.formats.BpSeq.Entry
- All Implemented Interfaces:
Serializable
,Comparable<BpSeq.Entry>
- Direct Known Subclasses:
ImmutableEntry
- Enclosing class:
- BpSeq
@Immutable
public abstract static class BpSeq.Entry
extends Object
implements Comparable<BpSeq.Entry>, Serializable
An entry of a BPSEQ data.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncomment()
final int
final boolean
contains
(int index) Checks for a paired BPSEQ entry (i, j) if a given index k lies between them: i < k < j.static BpSeq.Entry
fromString
(String line) Parses a string into a BPSEQ entry.abstract int
index()
boolean
isPaired()
final int
length()
abstract int
pair()
abstract char
seq()
toString()
-
Constructor Details
-
Entry
public Entry()
-
-
Method Details
-
fromString
Parses a string into a BPSEQ entry. Expected format: int char int- Parameters:
line
- A line containing a BPSEQ entry.- Returns:
- An instance of this class.
-
index
@Parameter(order=1) public abstract int index()- Returns:
- The value of index column.
-
seq
@Parameter(order=2) public abstract char seq()- Returns:
- The value of sequence column.
-
pair
@Parameter(order=3) public abstract int pair()- Returns:
- The value of pair column.
-
comment
- Returns:
- The optional comment.
-
isPaired
public boolean isPaired()- Returns:
- True if pair column is non-zero.
-
contains
public final boolean contains(int index) Checks for a paired BPSEQ entry (i, j) if a given index k lies between them: i < k < j.- Parameters:
index
- The index to check- Returns:
- True if index lies between this entry and its pair.
-
length
public final int length()- Returns:
- The difference between pair column and index column or 0 for unpaired entries.
-
compareTo
- Specified by:
compareTo
in interfaceComparable<BpSeq.Entry>
-
toString
-