Package pl.poznan.put.structure
Class DotBracketSymbol
- java.lang.Object
-
- pl.poznan.put.structure.DotBracketSymbol
-
- All Implemented Interfaces:
Serializable,Comparable<DotBracketSymbol>
- Direct Known Subclasses:
ImmutableDotBracketSymbol
@Immutable public abstract class DotBracketSymbol extends Object implements Comparable<DotBracketSymbol>, Serializable
A single symbol in a dot-bracket structure.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DotBracketSymbol()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intcompareTo(DotBracketSymbol t)abstract intindex()booleanisClosing()static booleanisClosing(char c)Checks if the given character is a closing character in dot-bracket format.booleanisMissing()booleanisOpening()static booleanisOpening(char c)Checks if the given character is an opening character in dot-bracket format.booleanisPairing()static booleanisPairing(char c)Checks if the given character is a pairing character in dot-bracket format.static charmatchingBracket(char c)Finds a matching bracket (closing for opening and vice versa) of the same level.intorder()abstract charsequence()abstract charstructure()StringtoString()
-
-
-
Method Detail
-
isPairing
public static boolean isPairing(char c)
Checks if the given character is a pairing character in dot-bracket format.- Parameters:
c- The character to check.- Returns:
- True if
cis either an opening or closing symbol.
-
isOpening
public static boolean isOpening(char c)
Checks if the given character is an opening character in dot-bracket format.- Parameters:
c- The character to check- Returns:
- True if
cis one of: ([{<ABCDEFGHIJKLMNOPQRSTUVWXYZ.
-
isClosing
public static boolean isClosing(char c)
Checks if the given character is a closing character in dot-bracket format.- Parameters:
c- The character to check- Returns:
- True if
cis one of: )]}>abcdefghijklmnopqrstuvwxyz.
-
matchingBracket
public static char matchingBracket(char c)
Finds a matching bracket (closing for opening and vice versa) of the same level.- Parameters:
c- The character to find a matching bracket for.- Returns:
- A matching bracket or a dot if the input is also a dot.
-
sequence
@Parameter(order=1) public abstract char sequence()
- Returns:
- The sequence character.
-
structure
@Parameter(order=2) public abstract char structure()
- Returns:
- The structure character (dot or bracket).
-
index
@Parameter(order=3) public abstract int index()
- Returns:
- The index of this symbol.
-
isMissing
public final boolean isMissing()
- Returns:
- True if this symbol is a minus '-'.
-
isPairing
public final boolean isPairing()
- Returns:
- True if this symbol is either opening or closing.
-
isOpening
public final boolean isOpening()
- Returns:
- True if this symbol is opening (see
isOpening(char)).
-
isClosing
public final boolean isClosing()
- Returns:
- True if this symbol is closing (see
isClosing(char)).
-
order
public final int order()
- Returns:
- The pseudoknot order of this symbol.
-
compareTo
public final int compareTo(DotBracketSymbol t)
- Specified by:
compareToin interfaceComparable<DotBracketSymbol>
-
-