C
- Tyoe of compound to holdjava.lang.Iterable<C>
, Accessioned
, ProxySequenceReader<C>
, Sequence<C>
, SequenceReader<C>
public class JoiningSequenceReader<C extends Compound> extends java.lang.Object implements ProxySequenceReader<C>
Constructor | Description |
---|---|
JoiningSequenceReader(java.util.List<Sequence<C>> sequences) |
Allows creation of the store from List
|
JoiningSequenceReader(CompoundSet<C> compoundSet,
java.util.List<Sequence<C>> sequences) |
|
JoiningSequenceReader(CompoundSet<C> compoundSet,
Sequence<C>... sequences) |
|
JoiningSequenceReader(Sequence<C>... sequences) |
Allows creation of the store from Vargs Sequence
|
Modifier and Type | Method | Description |
---|---|---|
int |
countCompounds(C... compounds) |
Returns the number of times we found a compound in the Sequence
|
AccessionID |
getAccession() |
Returns the AccessionID this location is currently bound with
|
java.util.List<C> |
getAsList() |
Returns the Sequence as a List of compounds
|
C |
getCompoundAt(int position) |
Returns the Compound at the given biological index
|
CompoundSet<C> |
getCompoundSet() |
Gets the compound set used to back this Sequence
|
int |
getIndexOf(C compound) |
Scans through the Sequence looking for the first occurrence of the given
compound
|
SequenceView<C> |
getInverse() |
Does the right thing to get the inverse of the current
Sequence.
|
int |
getLastIndexOf(C compound) |
Scans through the Sequence looking for the last occurrence of the given
compound
|
int |
getLength() |
Returns the length of the Sequence
|
java.lang.String |
getSequenceAsString() |
Returns the String representation of the Sequence
|
SequenceView<C> |
getSubSequence(java.lang.Integer start,
java.lang.Integer end) |
Returns a portion of the sequence from the different positions.
|
java.util.Iterator<C> |
iterator() |
Iterator implementation which attempts to move through the 2D structure
attempting to skip onto the next sequence as & when it is asked to
|
void |
setCompoundSet(CompoundSet<C> compoundSet) |
|
void |
setContents(java.lang.String sequence) |
public JoiningSequenceReader(Sequence<C>... sequences)
public JoiningSequenceReader(java.util.List<Sequence<C>> sequences)
public JoiningSequenceReader(CompoundSet<C> compoundSet, Sequence<C>... sequences)
public JoiningSequenceReader(CompoundSet<C> compoundSet, java.util.List<Sequence<C>> sequences)
public C getCompoundAt(int position)
Sequence
getCompoundAt
in interface Sequence<C extends Compound>
position
- Biological index (1 to n)public CompoundSet<C> getCompoundSet()
Sequence
getCompoundSet
in interface Sequence<C extends Compound>
public int getLength()
Sequence
public java.util.Iterator<C> iterator()
public void setCompoundSet(CompoundSet<C> compoundSet)
setCompoundSet
in interface SequenceReader<C extends Compound>
public void setContents(java.lang.String sequence) throws CompoundNotFoundException
setContents
in interface SequenceReader<C extends Compound>
CompoundNotFoundException
public int countCompounds(C... compounds)
Sequence
countCompounds
in interface Sequence<C extends Compound>
compounds
- Vargs of the compounds to countpublic AccessionID getAccession() throws java.lang.UnsupportedOperationException
Accessioned
getAccession
in interface Accessioned
java.lang.UnsupportedOperationException
public java.util.List<C> getAsList()
Sequence
public int getIndexOf(C compound)
Sequence
getIndexOf
in interface Sequence<C extends Compound>
compound
- Compounds to look forpublic int getLastIndexOf(C compound)
Sequence
getLastIndexOf
in interface Sequence<C extends Compound>
compound
- Compounds to look forpublic java.lang.String getSequenceAsString()
Sequence
getSequenceAsString
in interface Sequence<C extends Compound>
public SequenceView<C> getSubSequence(java.lang.Integer start, java.lang.Integer end)
Sequence
getSubSequence
in interface Sequence<C extends Compound>
start
- Biological index start; must be greater than 0end
- Biological end; must be less than length + 1public SequenceView<C> getInverse()
Sequence
getInverse
in interface Sequence<C extends Compound>