InMemoryDataMatrix implements DataMatrix { @Override public boolean containsGene(Integer entrezGeneId) { return entrezIdToRowIndex.containsKey(entrezGeneId); } InMemoryDataMatrix(FloatMatrix matrix, Map<Integer, Integer> entrezIdToRowIndex); static InMemoryDataMatrix fromMap(Map<Integer, float[]> columns, Map<Integer, Integer> entrezIdToRowIndex); @Override Map<Integer, Integer> getEntrezIdToRowIndex(); @Override FloatMatrix getMatrix(); @Override int numRows(); @Override int numColumns(); @Override boolean containsGene(Integer entrezGeneId); @Override Integer getRowIndexForGene(int entrezGeneId); @Override FloatMatrix getColumnMatrixForGene(int entrezGeneId); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void testContainsGeneIsTrue() { assertThat(instance.containsGene(0000), is(true)); }
@Test public void testContainsGeneIsFalse() { assertThat(instance.containsGene(9999), is(false)); }