public class LazyGenotypesContext extends GenotypesContext
Modifier and Type | Class and Description |
---|---|
static class |
LazyGenotypesContext.LazyData
Returns the data used in the full GenotypesContext constructor
GenotypesContext.GenotypesContext(java.util.ArrayList, java.util.Map, java.util.List) |
static interface |
LazyGenotypesContext.LazyParser
Simple lazy parser interface.
|
NO_GENOTYPES, notToBeDirectlyAccessedGenotypes, sampleNamesInOrder, sampleNameToOffset, serialVersionUID
Constructor and Description |
---|
LazyGenotypesContext(LazyGenotypesContext.LazyParser parser,
Object unparsedGenotypeData,
int nUnparsedGenotypes)
Creates a new lazy loading genotypes context using the LazyParser to create
genotypes data on demand.
|
Modifier and Type | Method and Description |
---|---|
void |
decode()
Force us to decode the genotypes, if not already done
|
protected void |
ensureSampleNameMap()
Overrides the ensure* functionality.
|
protected void |
ensureSampleOrdering() |
protected ArrayList<Genotype> |
getGenotypes()
Overrides the genotypes accessor.
|
Object |
getUnparsedGenotypeData() |
protected void |
invalidateSampleNameMap() |
protected void |
invalidateSampleOrdering() |
boolean |
isEmpty() |
int |
size() |
add, add, addAll, addAll, checkImmutability, clear, contains, containsAll, containsSample, containsSamples, copy, copy, create, create, create, create, create, get, get, getMaxPloidy, getSampleNames, getSampleNamesOrderedByName, immutable, indexOf, isLazyWithData, isMutable, iterateInSampleNameOrder, iterateInSampleNameOrder, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replace, retainAll, set, subList, subsetToSamples, toArray, toArray, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals, hashCode, replaceAll, sort, spliterator
parallelStream, removeIf, stream
public LazyGenotypesContext(LazyGenotypesContext.LazyParser parser, Object unparsedGenotypeData, int nUnparsedGenotypes)
parser
- the parser to be used to load on-demand genotypes dataunparsedGenotypeData
- the encoded genotypes data that we will decode if necessarynUnparsedGenotypes
- the number of genotypes that will be produced if / when we actually decode the genotypes dataprotected ArrayList<Genotype> getGenotypes()
getGenotypes
in class GenotypesContext
public void decode()
protected void ensureSampleNameMap()
ensureSampleNameMap
in class GenotypesContext
protected void ensureSampleOrdering()
ensureSampleOrdering
in class GenotypesContext
protected void invalidateSampleNameMap()
invalidateSampleNameMap
in class GenotypesContext
protected void invalidateSampleOrdering()
invalidateSampleOrdering
in class GenotypesContext
public boolean isEmpty()
isEmpty
in interface Collection<Genotype>
isEmpty
in interface List<Genotype>
isEmpty
in class GenotypesContext
public int size()
size
in interface Collection<Genotype>
size
in interface List<Genotype>
size
in class GenotypesContext
public Object getUnparsedGenotypeData()