@Test public void testGetValue() { DefaultKeyedValues v1 = new DefaultKeyedValues(); try { v1.getValue(-1); fail("Should have thrown an IndexOutOfBoundsException"); } catch (IndexOutOfBoundsException e) { } try { v1.getValue(0); fail("Should have thrown an IndexOutOfBoundsException"); } catch (IndexOutOfBoundsException e) { } DefaultKeyedValues v2 = new DefaultKeyedValues(); v2.addValue("K1", new Integer(1)); v2.addValue("K2", new Integer(2)); v2.addValue("K3", new Integer(3)); assertEquals(3, v2.getValue(2)); try { v2.getValue("KK"); fail("Should have thrown an UnknownKeyException"); } catch (UnknownKeyException e) { assertEquals("Key not found: KK", e.getMessage()); } }
@Override public Number getValue(int item) { return this.values.get(item); }
DefaultKeyedValues implements KeyedValues, Cloneable,
        PublicCloneable, Serializable { @Override public Number getValue(int item) { return this.values.get(item); } }
DefaultKeyedValues implements KeyedValues, Cloneable,
        PublicCloneable, Serializable { @Override public Number getValue(int item) { return this.values.get(item); } DefaultKeyedValues(); }
DefaultKeyedValues implements KeyedValues, Cloneable,
        PublicCloneable, Serializable { @Override public Number getValue(int item) { return this.values.get(item); } 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 { @Override public Number getValue(int item) { return this.values.get(item); } 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();  }