@Test public void testGetRowKey() { DefaultKeyedValues2D d = new DefaultKeyedValues2D(); try { d.getRowKey(0); fail("IndexOutOfBoundsException should have been thrown on querying empty dataset"); } catch (IndexOutOfBoundsException e) { assertEquals("Index: 0, Size: 0", e.getMessage()); } d.addValue(1.0, "R1", "C1"); d.addValue(1.0, "R2", "C1"); assertEquals("R1", d.getRowKey(0)); assertEquals("R2", d.getRowKey(1)); d = new DefaultKeyedValues2D(true); d.addValue(1.0, "R1", "C1"); assertEquals("R1", d.getRowKey(0)); d.addValue(0.0, "R0", "C1"); assertEquals("R0", d.getRowKey(0)); assertEquals("R1", d.getRowKey(1)); }
@Override public Comparable getRowKey(int row) { return this.rowKeys.get(row); }
DefaultKeyedValues2D implements KeyedValues2D, PublicCloneable,
        Cloneable, Serializable { @Override public Comparable getRowKey(int row) { return this.rowKeys.get(row); } }
DefaultKeyedValues2D implements KeyedValues2D, PublicCloneable,
        Cloneable, Serializable { @Override public Comparable getRowKey(int row) { return this.rowKeys.get(row); } DefaultKeyedValues2D();  DefaultKeyedValues2D(boolean sortRowKeys); }
DefaultKeyedValues2D implements KeyedValues2D, PublicCloneable,
        Cloneable, Serializable { @Override public Comparable getRowKey(int row) { return this.rowKeys.get(row); } DefaultKeyedValues2D();  DefaultKeyedValues2D(boolean sortRowKeys); @Override int getRowCount(); @Override int getColumnCount(); @Override Number getValue(int row, int column); @Override Comparable getRowKey(int row); @Override int getRowIndex(Comparable key); @Override List<Comparable> getRowKeys(); @Override Comparable getColumnKey(int column); @Override int getColumnIndex(Comparable key); @Override List<Comparable> getColumnKeys(); @Override Number getValue(Comparable rowKey, Comparable columnKey); void addValue(Number value, Comparable rowKey,
                         Comparable columnKey); void setValue(Number value, Comparable rowKey,
                         Comparable columnKey); void removeValue(Comparable rowKey, Comparable columnKey); void removeRow(int rowIndex); void removeRow(Comparable rowKey); void removeColumn(int columnIndex); void removeColumn(Comparable columnKey); void clear(); @Override boolean equals(Object o); @Override int hashCode(); @Override Object clone(); }
DefaultKeyedValues2D implements KeyedValues2D, PublicCloneable,
        Cloneable, Serializable { @Override public Comparable getRowKey(int row) { return this.rowKeys.get(row); } DefaultKeyedValues2D();  DefaultKeyedValues2D(boolean sortRowKeys); @Override int getRowCount(); @Override int getColumnCount(); @Override Number getValue(int row, int column); @Override Comparable getRowKey(int row); @Override int getRowIndex(Comparable key); @Override List<Comparable> getRowKeys(); @Override Comparable getColumnKey(int column); @Override int getColumnIndex(Comparable key); @Override List<Comparable> getColumnKeys(); @Override Number getValue(Comparable rowKey, Comparable columnKey); void addValue(Number value, Comparable rowKey,
                         Comparable columnKey); void setValue(Number value, Comparable rowKey,
                         Comparable columnKey); void removeValue(Comparable rowKey, Comparable columnKey); void removeRow(int rowIndex); void removeRow(Comparable rowKey); void removeColumn(int columnIndex); void removeColumn(Comparable columnKey); void clear(); @Override boolean equals(Object o); @Override int hashCode(); @Override Object clone();  }