public class SingleCompoundSequenceReader<C extends Compound> extends Object implements ProxySequenceReader<C>
Constructor and Description |
---|
SingleCompoundSequenceReader(C compound,
CompoundSet<C> compoundSet,
int length)
Build the object with a compound rather than a String
|
SingleCompoundSequenceReader(String compound,
CompoundSet<C> compoundSet,
int length)
Public constructor to be used with String based constructor
|
Modifier and Type | Method and Description |
---|---|
int |
countCompounds(C... compounds)
Delegates to
SequenceMixin#countCompounds(org.biojava.nbio.core.sequence.template.Sequence, C[]) |
boolean |
equals(Object o) |
AccessionID |
getAccession()
Unsupoorted
|
List<C> |
getAsList()
|
C |
getCompoundAt(int position)
Always returns the compound given at construction
|
CompoundSet<C> |
getCompoundSet()
Returns the compound set given at construction
|
int |
getIndexOf(C compound)
Returns 1 if the given compound is equal to the one given during
construction; otherwise will return -1.
|
SequenceView<C> |
getInverse()
Does the right thing to get the inverse of the current
Sequence.
|
int |
getLastIndexOf(C compound)
Returns the length of the Sequence if the given compound was equal to
the one given during construction.
|
int |
getLength()
Returns the length given during construction
|
String |
getSequenceAsString()
|
SequenceView<C> |
getSubSequence(Integer start,
Integer end)
Creates a
SequenceProxyView for the given coordinates |
int |
hashCode() |
Iterator<C> |
iterator()
Returns an instance of
SequenceMixin.SequenceIterator |
void |
setCompoundSet(CompoundSet<C> compoundSet)
Unsupported
|
void |
setContents(String sequence)
Unsupported
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public SingleCompoundSequenceReader(String compound, CompoundSet<C> compoundSet, int length)
public SingleCompoundSequenceReader(C compound, CompoundSet<C> compoundSet, int length)
public void setCompoundSet(CompoundSet<C> compoundSet)
setCompoundSet
in interface SequenceReader<C extends Compound>
public void setContents(String sequence) throws CompoundNotFoundException
setContents
in interface SequenceReader<C extends Compound>
CompoundNotFoundException
public int getLength()
public C getCompoundAt(int position)
getCompoundAt
in interface Sequence<C extends Compound>
position
- Biological index (1 to n)public int getIndexOf(C compound)
getIndexOf
in interface Sequence<C extends Compound>
compound
- Compounds to look forpublic int getLastIndexOf(C compound)
getLastIndexOf
in interface Sequence<C extends Compound>
compound
- Compounds to look forpublic String getSequenceAsString()
getSequenceAsString
in interface Sequence<C extends Compound>
public SequenceView<C> getSubSequence(Integer start, Integer end)
SequenceProxyView
for the given coordinatesgetSubSequence
in interface Sequence<C extends Compound>
start
- Biological index start; must be greater than 0end
- Biological end; must be less than length + 1public CompoundSet<C> getCompoundSet()
getCompoundSet
in interface Sequence<C extends Compound>
public AccessionID getAccession()
getAccession
in interface Accessioned
public int countCompounds(C... compounds)
SequenceMixin#countCompounds(org.biojava.nbio.core.sequence.template.Sequence, C[])
countCompounds
in interface Sequence<C extends Compound>
compounds
- Vargs of the compounds to countpublic SequenceView<C> getInverse()
Sequence
getInverse
in interface Sequence<C extends Compound>
Copyright © 2000–2016 BioJava. All rights reserved.