C
- public class ArrayListSequenceReader<C extends Compound> extends Object implements SequenceReader<C>
Constructor and Description |
---|
ArrayListSequenceReader() |
ArrayListSequenceReader(List<C> compounds,
CompoundSet<C> compoundSet) |
ArrayListSequenceReader(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(Object o) |
AccessionID |
getAccession()
Returns the AccessionID this location is currently bound with
|
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
|
String |
getSequenceAsString()
Returns the String representation of the Sequence
|
String |
getSequenceAsString(Integer begin,
Integer end,
Strand strand) |
SequenceView<C> |
getSubSequence(Integer bioBegin,
Integer bioEnd)
Returns a portion of the sequence from the different positions.
|
int |
hashCode() |
Iterator<C> |
iterator() |
void |
setCompoundSet(CompoundSet<C> compoundSet) |
void |
setContents(List<C> list) |
void |
setContents(String sequence) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public ArrayListSequenceReader()
public ArrayListSequenceReader(List<C> compounds, CompoundSet<C> compoundSet)
compounds
- compoundSet
- public ArrayListSequenceReader(String sequence, CompoundSet<C> compoundSet) throws CompoundNotFoundException
sequence
- compoundSet
- CompoundNotFoundException
public String getSequenceAsString()
Sequence
getSequenceAsString
in interface Sequence<C extends Compound>
public String getSequenceAsString(Integer begin, Integer end, Strand strand)
begin
- end
- strand
- public List<C> getAsList()
Sequence
public C getCompoundAt(int position)
Sequence
getCompoundAt
in interface Sequence<C extends Compound>
position
- public int getIndexOf(C compound)
Sequence
getIndexOf
in interface Sequence<C extends Compound>
compound
- public int getLastIndexOf(C compound)
Sequence
getLastIndexOf
in interface Sequence<C extends Compound>
compound
- public int getLength()
Sequence
public void setCompoundSet(CompoundSet<C> compoundSet)
setCompoundSet
in interface SequenceReader<C extends Compound>
compoundSet
- public CompoundSet<C> getCompoundSet()
Sequence
getCompoundSet
in interface Sequence<C extends Compound>
public void setContents(String sequence) throws CompoundNotFoundException
setContents
in interface SequenceReader<C extends Compound>
sequence
- CompoundNotFoundException
public SequenceView<C> getSubSequence(Integer bioBegin, Integer bioEnd)
Sequence
getSubSequence
in interface Sequence<C extends Compound>
bioBegin
- bioEnd
- public AccessionID getAccession()
Accessioned
getAccession
in interface Accessioned
public int countCompounds(C... compounds)
Sequence
countCompounds
in interface Sequence<C extends Compound>
compounds
- public SequenceView<C> getInverse()
Sequence
getInverse
in interface Sequence<C extends Compound>
Copyright © 2000–2016 BioJava. All rights reserved.