public class SequenceProxyView<C extends Compound> extends Object implements SequenceView<C>
| Constructor and Description |
|---|
SequenceProxyView() |
SequenceProxyView(Sequence<C> sequence) |
SequenceProxyView(Sequence<C> sequence,
Integer bioStart,
Integer bioEnd)
Main constructor for working with SequenceProxyViews
|
| 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
|
Integer |
getBioEnd()
1-indexed, inclusive.
|
Integer |
getBioStart()
1-indexed, inclusive.
|
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
|
SequenceView<C> |
getSubSequence(Integer bioStart,
Integer bioEnd)
Returns a portion of the sequence from the different positions.
|
Sequence<C> |
getViewedSequence() |
int |
hashCode() |
Iterator<C> |
iterator() |
void |
setBioEnd(Integer bioEnd) |
void |
setBioStart(Integer bioStart) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic SequenceProxyView()
public SequenceProxyView(Sequence<C> sequence)
public SequenceProxyView(Sequence<C> sequence, Integer bioStart, Integer bioEnd)
sequence - Sequence to proxybioStart - Start; cannot be less than 1bioEnd - End; cannot be greater than the sequence lengthpublic Sequence<C> getViewedSequence()
getViewedSequence in interface SequenceView<C extends Compound>public String getSequenceAsString()
SequencegetSequenceAsString in interface Sequence<C extends Compound>public List<C> getAsList()
Sequencepublic C getCompoundAt(int position)
SequencegetCompoundAt in interface Sequence<C extends Compound>position - Biological index (1 to n)public int getIndexOf(C compound)
SequencegetIndexOf in interface Sequence<C extends Compound>compound - Compounds to look forpublic int getLastIndexOf(C compound)
SequencegetLastIndexOf in interface Sequence<C extends Compound>compound - Compounds to look forpublic int getLength()
Sequencepublic CompoundSet<C> getCompoundSet()
SequencegetCompoundSet in interface Sequence<C extends Compound>public SequenceView<C> getSubSequence(Integer bioStart, Integer bioEnd)
SequencegetSubSequence in interface Sequence<C extends Compound>bioStart - Biological index start; must be greater than 0bioEnd - Biological end; must be less than length + 1public AccessionID getAccession()
AccessionedgetAccession in interface Accessionedpublic Integer getBioStart()
SequenceViewgetBioStart in interface SequenceView<C extends Compound>public void setBioStart(Integer bioStart)
bioStart - the bioStart to setpublic Integer getBioEnd()
SequenceViewgetBioEnd in interface SequenceView<C extends Compound>public int countCompounds(C... compounds)
SequencecountCompounds in interface Sequence<C extends Compound>compounds - Vargs of the compounds to countpublic SequenceView<C> getInverse()
SequencegetInverse in interface Sequence<C extends Compound>Copyright © 2000–2019 BioJava. All rights reserved.