@Test public void testGetWithDefault() { assertEquals(7, (int) config.get(Integer.class, INT_KEY, 4)); assertEquals(1, (int) config.get(Integer.class, MISSING_KEY, 1)); }
@Override public <T> Optional<T> get(Class<T> clazz, String path) { return Optional.ofNullable(get(clazz, path, null)); }
YamlConfiguration implements Configuration { @Override public <T> Optional<T> get(Class<T> clazz, String path) { return Optional.ofNullable(get(clazz, path, null)); } }
YamlConfiguration implements Configuration { @Override public <T> Optional<T> get(Class<T> clazz, String path) { return Optional.ofNullable(get(clazz, path, null)); } YamlConfiguration(Yaml yaml);  YamlConfiguration();  YamlConfiguration(File file);  YamlConfiguration(String yaml);  YamlConfiguration(Class<?> clazz, String resourcePath);  YamlConfiguration(InputStream inputStream); }
YamlConfiguration implements Configuration { @Override public <T> Optional<T> get(Class<T> clazz, String path) { return Optional.ofNullable(get(clazz, path, null)); } YamlConfiguration(Yaml yaml);  YamlConfiguration();  YamlConfiguration(File file);  YamlConfiguration(String yaml);  YamlConfiguration(Class<?> clazz, String resourcePath);  YamlConfiguration(InputStream inputStream); @Override @SuppressWarnings("unchecked") List<T> getAsList(String path); @Override List<Map<String, Object>> getAsListOfMaps(String path); @Override Optional<T> get(Class<T> clazz, String path); @Override Optional<T> getFirst(Class<T> clazz, String... paths); @Override T get(Class<T> clazz, String path, T defaultValue); @Override String toString(); @Override String originalConfig(); }
YamlConfiguration implements Configuration { @Override public <T> Optional<T> get(Class<T> clazz, String path) { return Optional.ofNullable(get(clazz, path, null)); } YamlConfiguration(Yaml yaml);  YamlConfiguration();  YamlConfiguration(File file);  YamlConfiguration(String yaml);  YamlConfiguration(Class<?> clazz, String resourcePath);  YamlConfiguration(InputStream inputStream); @Override @SuppressWarnings("unchecked") List<T> getAsList(String path); @Override List<Map<String, Object>> getAsListOfMaps(String path); @Override Optional<T> get(Class<T> clazz, String path); @Override Optional<T> getFirst(Class<T> clazz, String... paths); @Override T get(Class<T> clazz, String path, T defaultValue); @Override String toString(); @Override String originalConfig(); static final char SEP; }