GenericItemPreferenceArray implements PreferenceArray { @Override public void setValue(int i, float value) { values[i] = value; } GenericItemPreferenceArray(int size);  GenericItemPreferenceArray(List<? extends Preference> prefs); private  GenericItemPreferenceArray(long[] ids, long id, float[] values); @Override int length(); @Override Preference get(int i); @Override void set(int i, Preference pref); @Override long getUserID(int i); @Override void setUserID(int i, long userID); @Override long getItemID(int i); @Override void setItemID(int i, long itemID); @Override long[] getIDs(); @Override float getValue(int i); @Override void setValue(int i, float value); @Override void sortByUser(); @Override void sortByItem(); @Override void sortByValue(); @Override void sortByValueReversed(); @Override boolean hasPrefWithUserID(long userID); @Override boolean hasPrefWithItemID(long itemID); @Override GenericItemPreferenceArray clone(); @Override int hashCode(); @Override boolean equals(Object other); @Override Iterator<Preference> iterator(); @Override String toString();  }
@Test public void testSetValue() { PreferenceArray prefs = new GenericItemPreferenceArray(3); assertEquals(3, prefs.length()); prefs.setValue(0, 1.0f); prefs.setValue(1, 2.0f); prefs.setValue(2, 3.0f); assertEquals(1.0f, prefs.getValue(0), EPSILON); assertEquals(2.0f, prefs.getValue(1), EPSILON); assertEquals(3.0f, prefs.getValue(2), EPSILON); }