@Test public void testValueList() { AppConfigStorageItem item = new AppConfigStorageItem(); item.putString("string", "test"); item.putString("extraString", "testExtra"); item.putLong("long", -90234); item.putInt("int", 512); item.putBoolean("boolean", true); item.removeSetting("string"); String[] expectedValues = { "extraString", "long", "int", "boolean" }; String[] itemValues = item.valueList().toArray(new String[0]); Arrays.sort(expectedValues); Arrays.sort(itemValues); Assert.assertArrayEquals(expectedValues, itemValues); }
public ArrayList<String> valueList() { ArrayList<String> list = new ArrayList<>(); for (String key : storedSettings.keySet()) { list.add(key); } return list; }
AppConfigStorageItem { public ArrayList<String> valueList() { ArrayList<String> list = new ArrayList<>(); for (String key : storedSettings.keySet()) { list.add(key); } return list; } }
AppConfigStorageItem { public ArrayList<String> valueList() { ArrayList<String> list = new ArrayList<>(); for (String key : storedSettings.keySet()) { list.add(key); } return list; }  }
AppConfigStorageItem { public ArrayList<String> valueList() { ArrayList<String> list = new ArrayList<>(); for (String key : storedSettings.keySet()) { list.add(key); } return list; }  boolean getBoolean(String setting); int getInt(String setting); long getLong(String setting); String getString(String setting); String getStringNotNull(String setting); Object get(String setting); ArrayList<String> valueList(); void putBoolean(String setting, boolean value); void putInt(String setting, int value); void putLong(String setting, long value); void putString(String setting, String value); void put(String setting, Object value); boolean removeSetting(String setting); void copyValues(AppConfigStorageItem item); @Override boolean equals(Object o); }
AppConfigStorageItem { public ArrayList<String> valueList() { ArrayList<String> list = new ArrayList<>(); for (String key : storedSettings.keySet()) { list.add(key); } return list; }  boolean getBoolean(String setting); int getInt(String setting); long getLong(String setting); String getString(String setting); String getStringNotNull(String setting); Object get(String setting); ArrayList<String> valueList(); void putBoolean(String setting, boolean value); void putInt(String setting, int value); void putLong(String setting, long value); void putString(String setting, String value); void put(String setting, Object value); boolean removeSetting(String setting); void copyValues(AppConfigStorageItem item); @Override boolean equals(Object o);  }