Class ComplementSequenceView<C extends ComplementCompound>
- java.lang.Object
- 
- org.biojava.nbio.core.sequence.template.SequenceProxyView<C>
- 
- org.biojava.nbio.core.sequence.views.ComplementSequenceView<C>
 
 
- 
- Type Parameters:
- C- Must be a subtype of @{link ComplementCompound} since only those support complements
 - All Implemented Interfaces:
- Iterable<C>,- Accessioned,- Sequence<C>,- SequenceView<C>
 
 public class ComplementSequenceView<C extends ComplementCompound> extends SequenceProxyView<C> 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- Author:
- Andy Yates
 
- 
- 
Constructor SummaryConstructors Constructor Description ComplementSequenceView(Sequence<C> sequence)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description CgetCompoundAt(int position)Returns the Compound at the given biological indexintgetIndexOf(C compound)Scans through the Sequence looking for the first occurrence of the given compoundintgetLastIndexOf(C compound)Scans through the Sequence looking for the last occurrence of the given compoundStringgetSequenceAsString()Returns the String representation of the Sequence- 
Methods inherited from class org.biojava.nbio.core.sequence.template.SequenceProxyViewcountCompounds, equals, getAccession, getAsList, getBioEnd, getBioStart, getCompoundSet, getInverse, getLength, getSubSequence, getViewedSequence, hashCode, iterator, setBioEnd, setBioStart
 - 
Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface java.lang.IterableforEach, spliterator
 
- 
 
- 
- 
- 
Constructor Detail- 
ComplementSequenceViewpublic ComplementSequenceView(Sequence<C> sequence) 
 
- 
 - 
Method Detail- 
getSequenceAsStringpublic String getSequenceAsString() Description copied from interface:SequenceReturns the String representation of the Sequence- Specified by:
- getSequenceAsStringin interface- Sequence<C extends ComplementCompound>
- Overrides:
- getSequenceAsStringin class- SequenceProxyView<C extends ComplementCompound>
 
 - 
getCompoundAtpublic C getCompoundAt(int position) Description copied from interface:SequenceReturns the Compound at the given biological index- Specified by:
- getCompoundAtin interface- Sequence<C extends ComplementCompound>
- Overrides:
- getCompoundAtin class- SequenceProxyView<C extends ComplementCompound>
- Parameters:
- position- Biological index (1 to n)
- Returns:
- Compound at the specified position
 
 - 
getIndexOfpublic int getIndexOf(C compound) Description copied from interface:SequenceScans through the Sequence looking for the first occurrence of the given compound- Specified by:
- getIndexOfin interface- Sequence<C extends ComplementCompound>
- Overrides:
- getIndexOfin class- SequenceProxyView<C extends ComplementCompound>
- Parameters:
- compound- Compounds to look for
- Returns:
- Index of the first position of the compound in the sequence (1 to n)
 
 - 
getLastIndexOfpublic int getLastIndexOf(C compound) Description copied from interface:SequenceScans through the Sequence looking for the last occurrence of the given compound- Specified by:
- getLastIndexOfin interface- Sequence<C extends ComplementCompound>
- Overrides:
- getLastIndexOfin class- SequenceProxyView<C extends ComplementCompound>
- Parameters:
- compound- Compounds to look for
- Returns:
- Index of the last position of the compound in the sequence (1 to n)
 
 
- 
 
-