Class Region

java.lang.Object
pl.poznan.put.structure.pseudoknots.Region
All Implemented Interfaces:
Comparable<Region>
Direct Known Subclasses:
ImmutableRegion

@Immutable public abstract class Region extends Object implements Comparable<Region>
A collection of pairs (BPSEQ entries) which are consecutive in sequence.
  • Constructor Details

    • Region

      public Region()
  • Method Details

    • createRegions

      public static List<Region> createRegions(BpSeq bpSeq)
      Creates a list of regions from a secondary structure in BPSEQ format.
      Parameters:
      bpSeq - The input BPSEQ structure.
      Returns:
      A list of regions in the structure.
    • merge

      public static Region merge(Region... regions)
      Merges many regions into a new one.
      Parameters:
      regions - An array of regions to merge.
      Returns:
      A new intance of this class created by merging the input regions.
    • entries

      @Parameter(order=1) public abstract List<BpSeq.Entry> entries()
      Returns:
      The list of BPSEQ entries in this region.
    • length

      public final int length()
      Returns:
      The number of BPSEQ entries in this region.
    • begin

      @Default public int begin()
      Returns:
      The first index of a region.
    • end

      @Default public int end()
      Returns:
      The last index of a region.
    • isRemoved

      @Default @Auxiliary public boolean isRemoved()
      Returns:
      True if this region was removed.
    • compareTo

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

      public final String toString()
      Overrides:
      toString in class Object