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 Summary
Constructors Constructor Description Region()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intbegin()intcompareTo(Region t)static List<Region>createRegions(BpSeq bpSeq)Creates a list of regions from a secondary structure in BPSEQ format.intend()abstract List<BpSeq.Entry>entries()booleanisRemoved()intlength()static Regionmerge(Region... regions)Merges many regions into a new one.StringtoString()
-
-
-
Method Detail
-
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:
compareToin interfaceComparable<Region>
-
-