@Test public void testAddValue() { DefaultKeyedValues v1 = new DefaultKeyedValues(); v1.addValue("A", 1.0); assertEquals(1.0, v1.getValue("A")); v1.addValue("B", 2.0); assertEquals(2.0, v1.getValue("B")); v1.addValue("B", 3.0); assertEquals(3.0, v1.getValue("B")); assertEquals(2, v1.getItemCount()); v1.addValue("A", null); assertNull(v1.getValue("A")); assertEquals(2, v1.getItemCount()); try { v1.addValue(null, 99.9); fail("Should have thrown IllegalArgumentException on null key"); } catch (IllegalArgumentException e) { assertEquals("Null 'key' argument.", e.getMessage()); } }
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();  }