Package org.biojava3.core.sequence.views
Class ReversedSequenceView<C extends Compound>
java.lang.Object
org.biojava3.core.sequence.template.SequenceProxyView<C>
org.biojava3.core.sequence.views.ReversedSequenceView<C>
- Type Parameters:
C- Must be a subtype of @{link Compound}
- All Implemented Interfaces:
Iterable<C>,Accessioned,Sequence<C>,SequenceView<C>
For a given sequence this class will return the base at the reversed position i.e. in a sequence
of size 10, if you request base 2 you will get back the base at position 9. Sub-views can be made
of this class which also respect the reversed calls.
- Author:
- Andy Yates
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCompoundAt(int position) Returns the Compound at the given biological indexReturns the String representation of the SequenceMethods inherited from class org.biojava3.core.sequence.template.SequenceProxyView
countCompounds, getAccession, getAsList, getBioEnd, getBioStart, getCompoundSet, getIndexOf, getInverse, getLastIndexOf, getLength, getSubSequence, getViewedSequence, iterator, setBioEnd, setBioStartMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
ReversedSequenceView
-
-
Method Details
-
getSequenceAsString
Description copied from interface:SequenceReturns the String representation of the Sequence- Specified by:
getSequenceAsStringin interfaceSequence<C extends Compound>- Overrides:
getSequenceAsStringin classSequenceProxyView<C extends Compound>
-
getCompoundAt
Description copied from interface:SequenceReturns the Compound at the given biological index- Specified by:
getCompoundAtin interfaceSequence<C extends Compound>- Overrides:
getCompoundAtin classSequenceProxyView<C extends Compound>- Parameters:
position- Biological index (1 to n)- Returns:
- Compound at the specified position
-