BooleanUserPreferenceArray implements PreferenceArray { @Override public BooleanUserPreferenceArray clone() { return new BooleanUserPreferenceArray(ids.clone(), id); } BooleanUserPreferenceArray(int size);  BooleanUserPreferenceArray(List<? extends Preference> prefs); private  BooleanUserPreferenceArray(long[] ids, long id); @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 BooleanUserPreferenceArray clone(); @Override int hashCode(); @Override boolean equals(Object other); @Override Iterator<Preference> iterator(); @Override String toString();  }
@Test public void testClone() { BooleanUserPreferenceArray prefs = new BooleanUserPreferenceArray(3); prefs.set(0, new BooleanPreference(1L, 3L)); prefs.set(1, new BooleanPreference(1L, 1L)); prefs.set(2, new BooleanPreference(1L, 2L)); prefs = prefs.clone(); assertEquals(3L, prefs.getItemID(0)); assertEquals(1L, prefs.getUserID(1)); }