Class SingleCompoundSequenceReader<C extends Compound>

java.lang.Object
org.biojava3.core.sequence.storage.SingleCompoundSequenceReader<C>
All Implemented Interfaces:
Iterable<C>, Accessioned, ProxySequenceReader<C>, Sequence<C>, SequenceReader<C>

public class SingleCompoundSequenceReader<C extends Compound> extends Object implements ProxySequenceReader<C>
An implementation of the SequenceReader interface which for every call will return only 1 compound (given to it during construction; a String is also valid but will require a CompoundSet). The idea is to represent large runs of a single compound without the memory footprint of storing these compounds e.g. a run of 10KB of Ns in a DNASequence.
Author:
ayates
  • Constructor Details

    • SingleCompoundSequenceReader

      public SingleCompoundSequenceReader(String compound, CompoundSet<C> compoundSet, int length)
      Public constructor to be used with String based constructor
    • SingleCompoundSequenceReader

      public SingleCompoundSequenceReader(C compound, CompoundSet<C> compoundSet, int length)
      Build the object with a compound rather than a String
  • Method Details