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 Details

    • Entry

      public Entry()
  • Method Details

    • fromString

      public static BpSeq.Entry fromString(String line)
      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

      @Default public String 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

      public final int compareTo(BpSeq.Entry t)
      Specified by:
      compareTo in interface Comparable<BpSeq.Entry>
    • toString

      public String toString()
      Overrides:
      toString in class Object