AbstractParameters extends AbstractMap<String, V> implements Parameters<V> { public Object[] getArray(String key) { return getArray(key, null); }  String getString(String key); String getString(String key, String defValue); String[] getStringArray(String key); String[] getStringArray(String key, String[] defValue); boolean getBoolean(String key); boolean getBoolean(String key, boolean defValue); int getInt(String key); int getInt(String key, int defValue); int[] getIntArray(String key); int[] getIntArray(String key, int[] defValue); double getDouble(String key); double getDouble(String key, double defValue); long getLong(String key); long getLong(String key, long defValue); V get(String key, V defValue); Object[] getArray(String key); Object[] getArray(String key, Object[] defValue); static Parameters<V> toParameters(Map value); List<String> getStringList(String key); @Override List<T> getList(String key); Date getDate(String key); Date getDate(String key, Date defaultValue); T getEnum(Class<T> clazz, String key); T getEnum(Class<T> clazz, String key, T defaultValue); Map<String, V> toMap();  }
@Test public void getArray() throws Exception { assertArrayEquals(parameters.getArray("test"), null); assertArrayEquals(parameters.getArray("test", new String[] { "test" }), new String[] { "test" }); ParametersMap map = new ParametersMap(); map.put("test1", new Object[] {"abc", "bcd"}); map.put("test2", "abc"); assertArrayEquals(map.getArray("test1", new String[] { "test" }), new Object[] {"abc", "bcd"}); assertArrayEquals(map.getArray("test2", new String[] { "test" }), new String[] { "abc" }); }