@Test public void testProperties() { final ModifierProperties modifierProperties = new ModifierProperties(); modifierProperties.put("minimum", UnsignedLong.ZERO); modifierProperties.put("maximum", UnsignedLong.valueOf(10L)); modifierProperties.put("minimumStep", UnsignedLong.valueOf(1L)); modifierProperties.put("maximumStep", UnsignedLong.valueOf(10L)); final Counter64Modifier modifier = new Counter64Modifier(); modifier.init(modifierProperties); assertEquals(modifier.getMinimum(), UnsignedLong.ZERO); assertEquals(modifier.getMaximum(), UnsignedLong.valueOf(10L)); assertEquals(modifier.getMinimumStep(), UnsignedLong.valueOf(1L)); assertEquals(modifier.getMaximumStep(), UnsignedLong.valueOf(10L)); }
@Override public void init(final ModifierProperties properties) { this.minimum = Optional.ofNullable(properties.getUnsignedLong("minimum")).orElse(UnsignedLong.ZERO); this.maximum = Optional.ofNullable(properties.getUnsignedLong("maximum")).orElse(UnsignedLong.MAX_VALUE); this.minimumStep = Optional.ofNullable(properties.getUnsignedLong("minimumStep")).orElse(UnsignedLong.ZERO); this.maximumStep = Optional.ofNullable(properties.getUnsignedLong("maximumStep")).orElse(UnsignedLong.ONE); }
Counter64Modifier implements VariableModifier<Counter64> { @Override public void init(final ModifierProperties properties) { this.minimum = Optional.ofNullable(properties.getUnsignedLong("minimum")).orElse(UnsignedLong.ZERO); this.maximum = Optional.ofNullable(properties.getUnsignedLong("maximum")).orElse(UnsignedLong.MAX_VALUE); this.minimumStep = Optional.ofNullable(properties.getUnsignedLong("minimumStep")).orElse(UnsignedLong.ZERO); this.maximumStep = Optional.ofNullable(properties.getUnsignedLong("maximumStep")).orElse(UnsignedLong.ONE); } }
Counter64Modifier implements VariableModifier<Counter64> { @Override public void init(final ModifierProperties properties) { this.minimum = Optional.ofNullable(properties.getUnsignedLong("minimum")).orElse(UnsignedLong.ZERO); this.maximum = Optional.ofNullable(properties.getUnsignedLong("maximum")).orElse(UnsignedLong.MAX_VALUE); this.minimumStep = Optional.ofNullable(properties.getUnsignedLong("minimumStep")).orElse(UnsignedLong.ZERO); this.maximumStep = Optional.ofNullable(properties.getUnsignedLong("maximumStep")).orElse(UnsignedLong.ONE); }  }
Counter64Modifier implements VariableModifier<Counter64> { @Override public void init(final ModifierProperties properties) { this.minimum = Optional.ofNullable(properties.getUnsignedLong("minimum")).orElse(UnsignedLong.ZERO); this.maximum = Optional.ofNullable(properties.getUnsignedLong("maximum")).orElse(UnsignedLong.MAX_VALUE); this.minimumStep = Optional.ofNullable(properties.getUnsignedLong("minimumStep")).orElse(UnsignedLong.ZERO); this.maximumStep = Optional.ofNullable(properties.getUnsignedLong("maximumStep")).orElse(UnsignedLong.ONE); }  @Override void init(final ModifierProperties properties); @Override Counter64 modify(final Counter64 variable); }
Counter64Modifier implements VariableModifier<Counter64> { @Override public void init(final ModifierProperties properties) { this.minimum = Optional.ofNullable(properties.getUnsignedLong("minimum")).orElse(UnsignedLong.ZERO); this.maximum = Optional.ofNullable(properties.getUnsignedLong("maximum")).orElse(UnsignedLong.MAX_VALUE); this.minimumStep = Optional.ofNullable(properties.getUnsignedLong("minimumStep")).orElse(UnsignedLong.ZERO); this.maximumStep = Optional.ofNullable(properties.getUnsignedLong("maximumStep")).orElse(UnsignedLong.ONE); }  @Override void init(final ModifierProperties properties); @Override Counter64 modify(final Counter64 variable);  }