@Test public void testSerialization() throws IOException, ClassNotFoundException { KeyedObjects2D ko2D1 = new KeyedObjects2D(); ko2D1.addObject(234.2, "Row1", "Col1"); ko2D1.addObject(null, "Row1", "Col2"); ko2D1.addObject(345.9, "Row2", "Col1"); ko2D1.addObject(452.7, "Row2", "Col2"); ByteArrayOutputStream buffer = new ByteArrayOutputStream(); ObjectOutput out = new ObjectOutputStream(buffer); out.writeObject(ko2D1); out.close(); ObjectInput in = new ObjectInputStream( new ByteArrayInputStream(buffer.toByteArray())); KeyedObjects2D ko2D2 = (KeyedObjects2D) in.readObject(); in.close(); assertEquals(ko2D1, ko2D2); }
public void addObject(Object object, Comparable rowKey, Comparable columnKey) { setObject(object, rowKey, columnKey); }
KeyedObjects2D implements Cloneable, Serializable { public void addObject(Object object, Comparable rowKey, Comparable columnKey) { setObject(object, rowKey, columnKey); } }
KeyedObjects2D implements Cloneable, Serializable { public void addObject(Object object, Comparable rowKey, Comparable columnKey) { setObject(object, rowKey, columnKey); } KeyedObjects2D(); }
KeyedObjects2D implements Cloneable, Serializable { public void addObject(Object object, Comparable rowKey, Comparable columnKey) { setObject(object, rowKey, columnKey); } KeyedObjects2D(); int getRowCount(); int getColumnCount(); Object getObject(int row, int column); Comparable getRowKey(int row); int getRowIndex(Comparable key); List<Comparable> getRowKeys(); Comparable getColumnKey(int column); int getColumnIndex(Comparable key); List<Comparable> getColumnKeys(); Object getObject(Comparable rowKey, Comparable columnKey); void addObject(Object object, Comparable rowKey,
            Comparable columnKey); void setObject(Object object, Comparable rowKey,
            Comparable columnKey); void removeObject(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 obj); @Override int hashCode(); @Override Object clone(); }
KeyedObjects2D implements Cloneable, Serializable { public void addObject(Object object, Comparable rowKey, Comparable columnKey) { setObject(object, rowKey, columnKey); } KeyedObjects2D(); int getRowCount(); int getColumnCount(); Object getObject(int row, int column); Comparable getRowKey(int row); int getRowIndex(Comparable key); List<Comparable> getRowKeys(); Comparable getColumnKey(int column); int getColumnIndex(Comparable key); List<Comparable> getColumnKeys(); Object getObject(Comparable rowKey, Comparable columnKey); void addObject(Object object, Comparable rowKey,
            Comparable columnKey); void setObject(Object object, Comparable rowKey,
            Comparable columnKey); void removeObject(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 obj); @Override int hashCode(); @Override Object clone();  }