C - public class ArrayListSequenceReader<C extends Compound> extends java.lang.Object implements SequenceReader<C>
| Constructor and Description |
|---|
ArrayListSequenceReader() |
ArrayListSequenceReader(java.util.List<C> compounds,
CompoundSet<C> compoundSet) |
ArrayListSequenceReader(java.lang.String sequence,
CompoundSet<C> compoundSet) |
| Modifier and Type | Method and Description |
|---|---|
int |
countCompounds(C... compounds)
Returns the number of times we found a compound in the Sequence
|
boolean |
equals(java.lang.Object o) |
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
|
java.lang.String |
getSequenceAsString(java.lang.Integer begin,
java.lang.Integer end,
Strand strand) |
SequenceView<C> |
getSubSequence(java.lang.Integer bioBegin,
java.lang.Integer bioEnd)
Returns a portion of the sequence from the different positions.
|
int |
hashCode() |
java.util.Iterator<C> |
iterator() |
void |
setCompoundSet(CompoundSet<C> compoundSet) |
void |
setContents(java.util.List<C> list) |
void |
setContents(java.lang.String sequence) |
public ArrayListSequenceReader()
public ArrayListSequenceReader(java.util.List<C> compounds, CompoundSet<C> compoundSet)
compounds - compoundSet - public ArrayListSequenceReader(java.lang.String sequence,
CompoundSet<C> compoundSet)
throws CompoundNotFoundException
sequence - compoundSet - CompoundNotFoundExceptionpublic java.lang.String getSequenceAsString()
SequencegetSequenceAsString in interface Sequence<C extends Compound>public java.lang.String getSequenceAsString(java.lang.Integer begin,
java.lang.Integer end,
Strand strand)
begin - end - strand - public java.util.List<C> getAsList()
Sequencepublic C getCompoundAt(int position)
SequencegetCompoundAt in interface Sequence<C extends Compound>position - public int getIndexOf(C compound)
SequencegetIndexOf in interface Sequence<C extends Compound>compound - public int getLastIndexOf(C compound)
SequencegetLastIndexOf in interface Sequence<C extends Compound>compound - public int getLength()
Sequencepublic java.util.Iterator<C> iterator()
public void setCompoundSet(CompoundSet<C> compoundSet)
setCompoundSet in interface SequenceReader<C extends Compound>compoundSet - public CompoundSet<C> getCompoundSet()
SequencegetCompoundSet in interface Sequence<C extends Compound>public void setContents(java.lang.String sequence)
throws CompoundNotFoundException
setContents in interface SequenceReader<C extends Compound>sequence - CompoundNotFoundExceptionpublic void setContents(java.util.List<C> list)
list - public SequenceView<C> getSubSequence(java.lang.Integer bioBegin, java.lang.Integer bioEnd)
SequencegetSubSequence in interface Sequence<C extends Compound>bioBegin - bioEnd - public AccessionID getAccession()
AccessionedgetAccession in interface Accessionedpublic int countCompounds(C... compounds)
SequencecountCompounds in interface Sequence<C extends Compound>compounds - public SequenceView<C> getInverse()
SequencegetInverse in interface Sequence<C extends Compound>public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Object