@Test public void testListenerFiredOnCommandLine() { String[] args = {"--test_flag_string=moo"}; FlagFieldRegistry registry = Flagz.parse(args, EMPTY_PACKAGE_PREFIXES, SET_OF_THIS_TEST); verify(mockConsumer).accept("moo"); }
@Override public void accept(T value) { checkValidators(value); this.value = value; notifyListeners(value); }
BaseFlag implements Flag<T> { @Override public void accept(T value) { checkValidators(value); this.value = value; notifyListeners(value); } }
BaseFlag implements Flag<T> { @Override public void accept(T value) { checkValidators(value); this.value = value; notifyListeners(value); } BaseFlag(T defaultValue); }
BaseFlag implements Flag<T> { @Override public void accept(T value) { checkValidators(value); this.value = value; notifyListeners(value); } BaseFlag(T defaultValue); @Override T get(); @Override T defaultValue(); @Override void accept(T value); @Override String name(); @Nullable @Override String altName(); @Override String help(); BaseFlag<T> withValidator(Predicate<T> predicate); BaseFlag<T> withListener(Consumer<T> predicate); }
BaseFlag implements Flag<T> { @Override public void accept(T value) { checkValidators(value); this.value = value; notifyListeners(value); } BaseFlag(T defaultValue); @Override T get(); @Override T defaultValue(); @Override void accept(T value); @Override String name(); @Nullable @Override String altName(); @Override String help(); BaseFlag<T> withValidator(Predicate<T> predicate); BaseFlag<T> withListener(Consumer<T> predicate);  }