@Test public void testDefaultOptions() { Map<String, Object> options = formatter.getDefaultOptions(); assertNotNull("Default options should never be null.", options); assertEquals("Default options for numeric formatter should have two options.", 2, options.size()); }
@Override public Map<String, Object> getDefaultOptions() { Map<String, Object> options = new HashMap<>(); options.put(NUMERIC_FORMAT_OPTION, DEFAULT_NUMERIC_FORMAT); options.put(NUMERIC_PRECISION_OPTION, DEFAULT_NUMERIC_PRECISION); return options; }
NumericFormatter implements IValueFormatter { @Override public Map<String, Object> getDefaultOptions() { Map<String, Object> options = new HashMap<>(); options.put(NUMERIC_FORMAT_OPTION, DEFAULT_NUMERIC_FORMAT); options.put(NUMERIC_PRECISION_OPTION, DEFAULT_NUMERIC_PRECISION); return options; } }
NumericFormatter implements IValueFormatter { @Override public Map<String, Object> getDefaultOptions() { Map<String, Object> options = new HashMap<>(); options.put(NUMERIC_FORMAT_OPTION, DEFAULT_NUMERIC_FORMAT); options.put(NUMERIC_PRECISION_OPTION, DEFAULT_NUMERIC_PRECISION); return options; }  }
NumericFormatter implements IValueFormatter { @Override public Map<String, Object> getDefaultOptions() { Map<String, Object> options = new HashMap<>(); options.put(NUMERIC_FORMAT_OPTION, DEFAULT_NUMERIC_FORMAT); options.put(NUMERIC_PRECISION_OPTION, DEFAULT_NUMERIC_PRECISION); return options; }  @Override String toString(Object obj, Map<String, Object> options); @Override Value valueOf(String value, Type type, Map<String, Object> options); @Override boolean acceptType(Type type, Map<String, Object> options); @Override Map<String, Object> getDefaultOptions(); }
NumericFormatter implements IValueFormatter { @Override public Map<String, Object> getDefaultOptions() { Map<String, Object> options = new HashMap<>(); options.put(NUMERIC_FORMAT_OPTION, DEFAULT_NUMERIC_FORMAT); options.put(NUMERIC_PRECISION_OPTION, DEFAULT_NUMERIC_PRECISION); return options; }  @Override String toString(Object obj, Map<String, Object> options); @Override Value valueOf(String value, Type type, Map<String, Object> options); @Override boolean acceptType(Type type, Map<String, Object> options); @Override Map<String, Object> getDefaultOptions(); static final String NUMERIC_FORMAT_OPTION; static final String NUMERIC_PRECISION_OPTION; }