@Test public void testSerialization() throws IOException, ClassNotFoundException { DefaultKeyedValues v1 = new DefaultKeyedValues(); v1.addValue("Key 1", new Double(23)); v1.addValue("Key 2", null); v1.addValue("Key 3", new Double(42)); ByteArrayOutputStream buffer = new ByteArrayOutputStream(); ObjectOutput out = new ObjectOutputStream(buffer); out.writeObject(v1); out.close(); ObjectInput in = new ObjectInputStream( new ByteArrayInputStream(buffer.toByteArray()) ); DefaultKeyedValues v2 = (DefaultKeyedValues) in.readObject(); in.close(); assertEquals(v1, v2); }
public void addValue(Comparable key, double value) { addValue(key, new Double(value)); }
DefaultKeyedValues implements KeyedValues, Cloneable,
        PublicCloneable, Serializable { public void addValue(Comparable key, double value) { addValue(key, new Double(value)); } }
DefaultKeyedValues implements KeyedValues, Cloneable,
        PublicCloneable, Serializable { public void addValue(Comparable key, double value) { addValue(key, new Double(value)); } DefaultKeyedValues(); }
DefaultKeyedValues implements KeyedValues, Cloneable,
        PublicCloneable, Serializable { public void addValue(Comparable key, double value) { addValue(key, new Double(value)); } DefaultKeyedValues(); @Override int getItemCount(); @Override Number getValue(int item); @Override Comparable getKey(int index); @Override int getIndex(Comparable key); @Override List<Comparable> getKeys(); @Override Number getValue(Comparable key); void addValue(Comparable key, double value); void addValue(Comparable key, Number value); void setValue(Comparable key, double value); void setValue(Comparable key, Number value); void insertValue(int position, Comparable key, double value); void insertValue(int position, Comparable key, Number value); void removeValue(int index); void removeValue(Comparable key); void clear(); void sortByKeys(SortOrder order); void sortByValues(SortOrder order); @Override boolean equals(Object obj); @Override int hashCode(); @Override Object clone(); }
DefaultKeyedValues implements KeyedValues, Cloneable,
        PublicCloneable, Serializable { public void addValue(Comparable key, double value) { addValue(key, new Double(value)); } DefaultKeyedValues(); @Override int getItemCount(); @Override Number getValue(int item); @Override Comparable getKey(int index); @Override int getIndex(Comparable key); @Override List<Comparable> getKeys(); @Override Number getValue(Comparable key); void addValue(Comparable key, double value); void addValue(Comparable key, Number value); void setValue(Comparable key, double value); void setValue(Comparable key, Number value); void insertValue(int position, Comparable key, double value); void insertValue(int position, Comparable key, Number value); void removeValue(int index); void removeValue(Comparable key); void clear(); void sortByKeys(SortOrder order); void sortByValues(SortOrder order); @Override boolean equals(Object obj); @Override int hashCode(); @Override Object clone();  }