|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojava3.core.sequence.template.SequenceProxyView<C>
org.biojava3.core.sequence.views.ComplementSequenceView<C>
C
- Must be a subtype of @{link ComplementCompound} since
only those support complementspublic class ComplementSequenceView<C extends ComplementCompound>
For a given sequence this class will create a view over the top of it and for every request the code will return the complement of the underlying base e.g. base A will become base T
Constructor Summary | |
---|---|
ComplementSequenceView(Sequence<C> sequence)
|
Method Summary | |
---|---|
C |
getCompoundAt(int position)
Returns the Compound at the given biological index |
int |
getIndexOf(C compound)
Scans through the Sequence looking for the first occurrence of the given compound |
int |
getLastIndexOf(C compound)
Scans through the Sequence looking for the last occurrence of the given compound |
String |
getSequenceAsString()
Returns the String representation of the Sequence |
Methods inherited from class org.biojava3.core.sequence.template.SequenceProxyView |
---|
countCompounds, getAccession, getAsList, getBioEnd, getBioStart, getCompoundSet, getInverse, getLength, getSubSequence, getViewedSequence, iterator, setBioEnd, setBioStart |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ComplementSequenceView(Sequence<C> sequence)
Method Detail |
---|
public String getSequenceAsString()
Sequence
getSequenceAsString
in interface Sequence<C extends ComplementCompound>
getSequenceAsString
in class SequenceProxyView<C extends ComplementCompound>
public C getCompoundAt(int position)
Sequence
getCompoundAt
in interface Sequence<C extends ComplementCompound>
getCompoundAt
in class SequenceProxyView<C extends ComplementCompound>
position
- Biological index (1 to n)
public int getIndexOf(C compound)
Sequence
getIndexOf
in interface Sequence<C extends ComplementCompound>
getIndexOf
in class SequenceProxyView<C extends ComplementCompound>
compound
- Compounds to look for
public int getLastIndexOf(C compound)
Sequence
getLastIndexOf
in interface Sequence<C extends ComplementCompound>
getLastIndexOf
in class SequenceProxyView<C extends ComplementCompound>
compound
- Compounds to look for
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |