/** * @return The set of sample names for all genotypes in this context, in arbitrary order */ public Set<String> getSampleNames() { ensureSampleNameMap(); return sampleNameToOffset.keySet(); }
private Integer getSampleI(final String sampleName) { ensureSampleNameMap(); return sampleNameToOffset.get(sampleName); }
/** * @return The set of sample names for all genotypes in this context, in arbitrary order */ public Set<String> getSampleNames() { ensureSampleNameMap(); return sampleNameToOffset.keySet(); }
private Integer getSampleI(final String sampleName) { ensureSampleNameMap(); return sampleNameToOffset.get(sampleName); }
public boolean containsSample(final String sample) { ensureSampleNameMap(); return sampleNameToOffset.containsKey(sample); }
public boolean containsSample(final String sample) { ensureSampleNameMap(); return sampleNameToOffset.containsKey(sample); }
private Integer getSampleI(final String sampleName) { ensureSampleNameMap(); return sampleNameToOffset.get(sampleName); }
@Requires("sample != null") public boolean containsSample(final String sample) { ensureSampleNameMap(); return sampleNameToOffset.containsKey(sample); }
/** * @return The set of sample names for all genotypes in this context, in arbitrary order */ @Ensures("result != null") public Set<String> getSampleNames() { ensureSampleNameMap(); return sampleNameToOffset.keySet(); }
/** * Overrides the ensure* functionality. If the data hasn't been loaded * yet and we want to build the cache, just decode it and we're done. If we've * already decoded the data, though, go through the super class */ @Override protected synchronized void ensureSampleNameMap() { if ( ! loaded ) { decode(); // will load up all of the necessary data } else { super.ensureSampleNameMap(); } }
/** * Overrides the ensure* functionality. If the data hasn't been loaded * yet and we want to build the cache, just decode it and we're done. If we've * already decoded the data, though, go through the super class */ @Override protected synchronized void ensureSampleNameMap() { if ( ! loaded ) { decode(); // will load up all of the necessary data } else { super.ensureSampleNameMap(); } }
/** * Overrides the ensure* functionality. If the data hasn't been loaded * yet and we want to build the cache, just decode it and we're done. If we've * already decoded the data, though, go through the super class */ @Override protected synchronized void ensureSampleNameMap() { if ( ! loaded ) { decode(); // will load up all of the necessary data } else { super.ensureSampleNameMap(); } }
@Override public LazyGenotypesContext.LazyData parse(final Object data) { GenotypesContext gc = GenotypesContext.copy((List<Genotype>)data); gc.ensureSampleNameMap(); gc.ensureSampleOrdering(); return new LazyGenotypesContext.LazyData(gc.notToBeDirectlyAccessedGenotypes, gc.sampleNamesInOrder, gc.sampleNameToOffset); }