T - the type of each positionpublic abstract static class Sequence.RecursiveSequence<T> extends Sequence<T>
Sequence. After creating an
Sequence.RecursiveSequence, no SequenceAnnotation of the internally Sequence
is returned by Sequence.getAnnotation(), ...Sequence.CompositeSequence<T>, Sequence.RecursiveSequence<T>, Sequence.SubSequence<T>| Modifier and Type | Field and Description |
|---|---|
protected Sequence<T> |
content
The internal sequence.
|
alphabetCon, annotation, rc| Constructor and Description |
|---|
RecursiveSequence(AlphabetContainer alphabet,
Sequence<T> seq)
Creates a new
Sequence.RecursiveSequence on the Sequence
seq with the AlphabetContainer alphabet
using the annotation of the given Sequence. |
RecursiveSequence(AlphabetContainer alphabet,
SequenceAnnotation[] annotation,
Sequence<T> seq)
Creates a new
Sequence.RecursiveSequence on the Sequence
seq with the AlphabetContainer alphabet
and the annotation annotation. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addToRepresentation(Object representation,
int pos,
String delim)
This method adds the information of one position to the representation using the specified delimiter
|
int |
compareTo(T t1,
T t2)
This method compares to container and is used in
Sequence.compareTo(Sequence). |
double |
continuousVal(int pos)
Returns the continuous value at position
pos of the
Sequence. |
int |
discreteVal(int pos)
Returns the discrete value at position
pos of the
Sequence. |
void |
fillContainer(T container,
int pos)
The method fills the content of a specific position in to the container.
|
T |
getEmptyContainer()
The method returns a container that can be used for accessing the symbols for each position.
|
protected Object |
getEmptyRepresentation()
Returns an empty representation which is used to create the
String representation of this instance in the method Sequence.toString(String, int, int). |
protected abstract int |
getIndex(int pos)
Returns the index in the internal sequence.
|
protected String |
getStringRepresentation(Object representation)
This method creates a String representation from the given representation.
|
protected int |
hashCodeForPos(int pos)
This method is used in
Sequence.hashCode() and the hash code for one specific position. |
boolean |
isMultiDimensional()
The method returns
true if the sequence is multidimensional, otherwise false. |
annotate, compareTo, complement, complement, create, create, create, equals, flatCloneWithoutAnnotation, getAlphabetContainer, getAnnotation, getCompositeSequence, getCompositeSequence, getHammingDistance, getLength, getNumberOfSequenceAnnotationsByType, getSequenceAnnotationByType, getSequenceAnnotationByTypeAndIdentifier, getSubSequence, getSubSequence, getSubSequence, getSubSequence, hashCode, matches, reverse, reverse, reverseComplement, reverseComplement, toDiscrete, toString, toString, toString, toStringpublic RecursiveSequence(AlphabetContainer alphabet, SequenceAnnotation[] annotation, Sequence<T> seq)
Sequence.RecursiveSequence on the Sequence
seq with the AlphabetContainer alphabet
and the annotation annotation.alphabet - the AlphabetContainerannotation - the annotation of the Sequence.RecursiveSequenceseq - the sequenceSequence.Sequence(AlphabetContainer, SequenceAnnotation[])public RecursiveSequence(AlphabetContainer alphabet, Sequence<T> seq)
Sequence.RecursiveSequence on the Sequence
seq with the AlphabetContainer alphabet
using the annotation of the given Sequence.alphabet - the AlphabetContainerseq - the sequencepublic double continuousVal(int pos)
Sequencepos of the
Sequence.continuousVal in class Sequence<T>pos - the position of the Sequencepos of the
Sequencepublic int discreteVal(int pos)
Sequencepos of the
Sequence.discreteVal in class Sequence<T>pos - the position of the Sequencepos of the
Sequenceprotected abstract int getIndex(int pos)
pos - the index in the external sequencepublic boolean isMultiDimensional()
Sequencetrue if the sequence is multidimensional, otherwise false.isMultiDimensional in class Sequence<T>true if the sequence is multidimensional, otherwise falsepublic T getEmptyContainer()
SequencegetEmptyContainer in class Sequence<T>Sequence.fillContainer(Object, int),
Sequence.isMultiDimensional()public void fillContainer(T container, int pos)
SequencefillContainer in class Sequence<T>container - the container which is used for filling the content.pos - the positionSequence.getEmptyContainer(),
Sequence.isMultiDimensional()public int compareTo(T t1, T t2)
SequenceSequence.compareTo(Sequence).compareTo in class Sequence<T>t1 - the first containert2 - the second containerSequence.getEmptyContainer(),
Sequence.fillContainer(Object, int),
Comparable.compareTo(java.lang.Object)protected Object getEmptyRepresentation()
SequenceString representation of this instance in the method Sequence.toString(String, int, int).getEmptyRepresentation in class Sequence<T>String representationSequence.toString(String, int, int)protected void addToRepresentation(Object representation, int pos, String delim)
SequenceaddToRepresentation in class Sequence<T>representation - the representationpos - the positiondelim - the delimiter separating the information for different positionsSequence.getEmptyRepresentation(),
Sequence.toString(String, int, int)protected String getStringRepresentation(Object representation)
SequencegetStringRepresentation in class Sequence<T>representation - the representation instance (which should be created by Sequence.getEmptyContainer() and filled by Sequence.addToRepresentation(Object, int, String))Sequence.getEmptyRepresentation(),
Sequence.addToRepresentation(Object, int, String),
Sequence.toString(String, int, int)protected int hashCodeForPos(int pos)
SequenceSequence.hashCode() and the hash code for one specific position.hashCodeForPos in class Sequence<T>pos - the position