@Test public void testSetObjectVariable() { FilterOptions filterOptions = new FilterOptions(Arrays.asList("option1=someobjectvalue")); filterOptions.getString("option1", v -> forTestSetObjectVariable = v); assertEquals("someobjectvalue", forTestSetObjectVariable); }
public void getString(String key, Consumer<String> consumer) { if (this.options.containsKey(key)) { consumer.accept(this.options.get(key)); } }
FilterOptions implements IAnnotation { public void getString(String key, Consumer<String> consumer) { if (this.options.containsKey(key)) { consumer.accept(this.options.get(key)); } } }
FilterOptions implements IAnnotation { public void getString(String key, Consumer<String> consumer) { if (this.options.containsKey(key)) { consumer.accept(this.options.get(key)); } } FilterOptions(List<String> options); }
FilterOptions implements IAnnotation { public void getString(String key, Consumer<String> consumer) { if (this.options.containsKey(key)) { consumer.accept(this.options.get(key)); } } FilterOptions(List<String> options); void getString(String key, Consumer<String> consumer); void getBoolean(String key, Consumer<Boolean> consumer); }
FilterOptions implements IAnnotation { public void getString(String key, Consumer<String> consumer) { if (this.options.containsKey(key)) { consumer.accept(this.options.get(key)); } } FilterOptions(List<String> options); void getString(String key, Consumer<String> consumer); void getBoolean(String key, Consumer<Boolean> consumer);  }