Class BitSequenceReader.BitArrayWorker<C extends Compound>
java.lang.Object
org.biojava3.core.sequence.storage.BitSequenceReader.BitArrayWorker<C>
- Type Parameters:
C
- TheCompound
to use
- Direct Known Subclasses:
FourBitSequenceReader.FourBitArrayWorker
,TwoBitSequenceReader.TwoBitArrayWorker
- Enclosing class:
- BitSequenceReader<C extends Compound>
The logic of working with a bit has been separated out into this class to help developers create
the bit data structures without having to put the code into an intermediate format and to also
use the format without the need to copy this code.
This class behaves just like a
Sequence
without the interface- Author:
- ayates
-
Field Summary
-
Constructor Summary
ConstructorDescriptionBitArrayWorker
(String sequence, CompoundSet<C> compoundSet) BitArrayWorker
(CompoundSet<C> compoundSet, int length) BitArrayWorker
(CompoundSet<C> compoundSet, int[] sequence) BitArrayWorker
(Sequence<C> sequence) -
Method Summary
Modifier and TypeMethodDescriptionboolean
getCompoundAt
(int position) Returns the compound at the specified biological indexReturns the compound set backing this storeint
int
hashCode()
void
Loops through the chars in a String and passes them ontosetCompoundAt(char, int)
void
Loops through the Compounds in a Sequence and passes them ontosetCompoundAt(Compound, int)
int
seqArraySize
(int length) void
setCompoundAt
(char base, int position) Converts from char to Compound and sets it at the given biological indexvoid
setCompoundAt
(C compound, int position) Sets the compound at the specified biological index
-
Field Details
-
BYTES_PER_INT
public static final int BYTES_PER_INT- See Also:
-
-
Constructor Details
-
BitArrayWorker
-
BitArrayWorker
-
BitArrayWorker
-
BitArrayWorker
-
-
Method Details
-
seqArraySize
public int seqArraySize(int length) -
populate
Loops through the Compounds in a Sequence and passes them ontosetCompoundAt(Compound, int)
-
populate
Loops through the chars in a String and passes them ontosetCompoundAt(char, int)
-
setCompoundAt
public void setCompoundAt(char base, int position) Converts from char to Compound and sets it at the given biological index -
setCompoundAt
Sets the compound at the specified biological index -
getCompoundAt
Returns the compound at the specified biological index -
getCompoundSet
Returns the compound set backing this store -
getLength
public int getLength() -
hashCode
public int hashCode() -
equals
-