Class SequenceIndexer<T extends BinarySequence>
java.lang.Object
org.snpeff.binseq.indexer.SequenceIndexer<T>
- All Implemented Interfaces:
Iterable<T>, Comparator<Long>
- Direct Known Subclasses:
SuffixIndexerNmer
public class SequenceIndexer<T extends BinarySequence>
extends Object
implements Comparator<Long>, Iterable<T>
A collection of sequences that are indexed using some algorithm
Note: The ID is just the position in the array. That is why the array
should not change the order of the elements (only append new ones or
replace old ones).
- Author:
- pcingola
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongMethods inherited from interface Iterable
forEach, spliterator
-
Constructor Details
-
SequenceIndexer
-
-
Method Details
-
add
-
add
Add a sequence to this index- Parameters:
sequence-- Returns:
- Index to this sequence (a number that can be used to retrieve this sequence)
-
compare
Compare two references- Specified by:
comparein interfaceComparator<T extends BinarySequence>- Parameters:
reference1-reference2-- Returns:
-
get
-
iterator
-
size
public int size()Number of sequences in this index- Returns:
-