Class ArrayListSequenceReader<C extends Compound>

    • Constructor Detail

      • ArrayListSequenceReader

        public ArrayListSequenceReader()
      • ArrayListSequenceReader

        public ArrayListSequenceReader​(java.util.List<C> compounds,
                                       CompoundSet<C> compoundSet)
        Parameters:
        compounds -
        compoundSet -
    • Method Detail

      • getSequenceAsString

        public java.lang.String getSequenceAsString()
        Description copied from interface: Sequence
        Returns the String representation of the Sequence
        Specified by:
        getSequenceAsString in interface Sequence<C extends Compound>
        Returns:
      • getSequenceAsString

        public java.lang.String getSequenceAsString​(java.lang.Integer begin,
                                                    java.lang.Integer end,
                                                    Strand strand)
        Parameters:
        begin -
        end -
        strand -
        Returns:
      • getAsList

        public java.util.List<C> getAsList()
        Description copied from interface: Sequence
        Returns the Sequence as a List of compounds
        Specified by:
        getAsList in interface Sequence<C extends Compound>
        Returns:
      • getCompoundAt

        public C getCompoundAt​(int position)
        Description copied from interface: Sequence
        Returns the Compound at the given biological index
        Specified by:
        getCompoundAt in interface Sequence<C extends Compound>
        Parameters:
        position -
        Returns:
      • getIndexOf

        public int getIndexOf​(C compound)
        Description copied from interface: Sequence
        Scans through the Sequence looking for the first occurrence of the given compound
        Specified by:
        getIndexOf in interface Sequence<C extends Compound>
        Parameters:
        compound -
        Returns:
      • getLastIndexOf

        public int getLastIndexOf​(C compound)
        Description copied from interface: Sequence
        Scans through the Sequence looking for the last occurrence of the given compound
        Specified by:
        getLastIndexOf in interface Sequence<C extends Compound>
        Parameters:
        compound -
        Returns:
      • getLength

        public int getLength()
        Description copied from interface: Sequence
        Returns the length of the Sequence
        Specified by:
        getLength in interface Sequence<C extends Compound>
        Returns:
      • iterator

        public java.util.Iterator<C> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<C extends Compound>
        Returns:
      • setContents

        public void setContents​(java.util.List<C> list)
        Parameters:
        list -
      • getSubSequence

        public SequenceView<C> getSubSequence​(java.lang.Integer bioBegin,
                                              java.lang.Integer bioEnd)
        Description copied from interface: Sequence
        Returns a portion of the sequence from the different positions. This is indexed from 1
        Specified by:
        getSubSequence in interface Sequence<C extends Compound>
        Parameters:
        bioBegin -
        bioEnd -
        Returns:
      • countCompounds

        public int countCompounds​(C... compounds)
        Description copied from interface: Sequence
        Returns the number of times we found a compound in the Sequence
        Specified by:
        countCompounds in interface Sequence<C extends Compound>
        Parameters:
        compounds -
        Returns:
      • getInverse

        public SequenceView<C> getInverse()
        Description copied from interface: Sequence
        Does the right thing to get the inverse of the current Sequence. This means either reversing the Sequence and optionally complementing the Sequence.
        Specified by:
        getInverse in interface Sequence<C extends Compound>
        Returns:
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object