@Test public void testRound() { assertEquals(0L, NumberFieldActions.round(new Round(), null)); assertEquals(2L, NumberFieldActions.round(new Round(), BigDecimal.valueOf(1.5))); assertEquals(1L, NumberFieldActions.round(new Round(), 1.4)); assertEquals(2L, NumberFieldActions.round(new Round(), 1.5F)); assertEquals(2L, NumberFieldActions.round(new Round(), new AtomicLong(2L))); assertEquals(2L, NumberFieldActions.round(new Round(), 2L)); assertEquals(2L, NumberFieldActions.round(new Round(), new AtomicInteger(2))); assertEquals(2L, NumberFieldActions.round(new Round(), 2)); assertEquals(2L, NumberFieldActions.round(new Round(), (byte) 2)); }
@AtlasActionProcessor public static Number round(Round action, Number input) { return input == null ? 0L : Math.round(input.doubleValue()); }
NumberFieldActions implements AtlasFieldAction { @AtlasActionProcessor public static Number round(Round action, Number input) { return input == null ? 0L : Math.round(input.doubleValue()); } }
NumberFieldActions implements AtlasFieldAction { @AtlasActionProcessor public static Number round(Round action, Number input) { return input == null ? 0L : Math.round(input.doubleValue()); }  }
NumberFieldActions implements AtlasFieldAction { @AtlasActionProcessor public static Number round(Round action, Number input) { return input == null ? 0L : Math.round(input.doubleValue()); }  @AtlasActionProcessor static Number absoluteValue(AbsoluteValue action, Number input); @AtlasActionProcessor static Number add(Add action, List<Number> inputs); @AtlasActionProcessor static Number average(Average action, List<Number> inputs); @AtlasActionProcessor static Number ceiling(Ceiling action, Number input); @AtlasActionProcessor static Number convertMassUnit(ConvertMassUnit convertMassUnit, Number input); @AtlasActionProcessor static Number convertDistanceUnit(ConvertDistanceUnit convertDistanceUnit, Number input); @AtlasActionProcessor static Number convertAreaUnit(ConvertAreaUnit convertAreaUnit, Number input); @AtlasActionProcessor static Number convertVolumeUnit(ConvertVolumeUnit convertVolumeUnit, Number input); @AtlasActionProcessor static Number divide(Divide divide, List<Number> inputs); @AtlasActionProcessor static Number floor(Floor floor, Number input); @AtlasActionProcessor static Number maximum(Maximum maximum, List<Number> inputs); @AtlasActionProcessor static Number minimum(Minimum minimum, List<Number> inputs); @AtlasActionProcessor static Number multiply(Multiply multiply, List<Number> inputs); @AtlasActionProcessor static Number round(Round action, Number input); @AtlasActionProcessor static Number subtract(Subtract subtract, List<Number> inputs); }
NumberFieldActions implements AtlasFieldAction { @AtlasActionProcessor public static Number round(Round action, Number input) { return input == null ? 0L : Math.round(input.doubleValue()); }  @AtlasActionProcessor static Number absoluteValue(AbsoluteValue action, Number input); @AtlasActionProcessor static Number add(Add action, List<Number> inputs); @AtlasActionProcessor static Number average(Average action, List<Number> inputs); @AtlasActionProcessor static Number ceiling(Ceiling action, Number input); @AtlasActionProcessor static Number convertMassUnit(ConvertMassUnit convertMassUnit, Number input); @AtlasActionProcessor static Number convertDistanceUnit(ConvertDistanceUnit convertDistanceUnit, Number input); @AtlasActionProcessor static Number convertAreaUnit(ConvertAreaUnit convertAreaUnit, Number input); @AtlasActionProcessor static Number convertVolumeUnit(ConvertVolumeUnit convertVolumeUnit, Number input); @AtlasActionProcessor static Number divide(Divide divide, List<Number> inputs); @AtlasActionProcessor static Number floor(Floor floor, Number input); @AtlasActionProcessor static Number maximum(Maximum maximum, List<Number> inputs); @AtlasActionProcessor static Number minimum(Minimum minimum, List<Number> inputs); @AtlasActionProcessor static Number multiply(Multiply multiply, List<Number> inputs); @AtlasActionProcessor static Number round(Round action, Number input); @AtlasActionProcessor static Number subtract(Subtract subtract, List<Number> inputs);  }