@Test public void displayEquals1() { assertThat(ValueUtil.displayEquals(displayNone(), displayNone()), equalTo(true)); Display display1 = newDisplay(0.0, 1.0, 2.0, "", NumberFormats.toStringFormat(), 8.0, 9.0, 10.0, 0.0, 10.0); assertThat(ValueUtil.displayEquals(display1, displayNone()), equalTo(false)); Display display2 = newDisplay(0.0, 1.0, 2.0, "", NumberFormats.toStringFormat(), 8.0, 9.0, 10.0, 0.0, 10.0); assertThat(ValueUtil.displayEquals(display1, display2), equalTo(true)); display2 = newDisplay(0.1, 1.0, 2.0, "", NumberFormats.toStringFormat(), 8.0, 9.0, 10.0, 0.0, 10.0); assertThat(ValueUtil.displayEquals(display1, display2), equalTo(false)); display2 = newDisplay(0.0, 1.1, 2.0, "", NumberFormats.toStringFormat(), 8.0, 9.0, 10.0, 0.0, 10.0); assertThat(ValueUtil.displayEquals(display1, display2), equalTo(false)); display2 = newDisplay(0.0, 1.0, 2.1, "", NumberFormats.toStringFormat(), 8.0, 9.0, 10.0, 0.0, 10.0); assertThat(ValueUtil.displayEquals(display1, display2), equalTo(false)); display2 = newDisplay(0.0, 1.0, 2.0, "a", NumberFormats.toStringFormat(), 8.0, 9.0, 10.0, 0.0, 10.0); assertThat(ValueUtil.displayEquals(display1, display2), equalTo(false)); display2 = newDisplay(0.0, 1.0, 2.0, "", NumberFormats.format(2), 8.0, 9.0, 10.0, 0.0, 10.0); assertThat(ValueUtil.displayEquals(display1, display2), equalTo(false)); display2 = newDisplay(0.0, 1.0, 2.0, "", NumberFormats.toStringFormat(), 8.1, 9.0, 10.0, 0.0, 10.0); assertThat(ValueUtil.displayEquals(display1, display2), equalTo(false)); display2 = newDisplay(0.0, 1.0, 2.0, "", NumberFormats.toStringFormat(), 8.0, 9.1, 10.0, 0.0, 10.0); assertThat(ValueUtil.displayEquals(display1, display2), equalTo(false)); display2 = newDisplay(0.0, 1.0, 2.0, "", NumberFormats.toStringFormat(), 8.0, 9.0, 10.1, 0.0, 10.0); assertThat(ValueUtil.displayEquals(display1, display2), equalTo(false)); display2 = newDisplay(0.0, 1.0, 2.0, "", NumberFormats.toStringFormat(), 8.0, 9.0, 10.0, 0.1, 10.0); assertThat(ValueUtil.displayEquals(display1, display2), equalTo(false)); display2 = newDisplay(0.0, 1.0, 2.0, "", NumberFormats.toStringFormat(), 8.0, 9.0, 10.0, 0.0, 10.1); assertThat(ValueUtil.displayEquals(display1, display2), equalTo(false)); }
public static boolean displayEquals(Display d1, Display d2) { if (d1 == d2) { return true; } if (Objects.equals(d1.getFormat(), d2.getFormat()) && Objects.equals(d1.getUnits(), d2.getUnits()) && Objects.equals(d1.getLowerDisplayLimit(), d2.getLowerDisplayLimit()) && Objects.equals(d1.getLowerAlarmLimit(), d2.getLowerAlarmLimit()) && Objects.equals(d1.getLowerWarningLimit(), d2.getLowerWarningLimit()) && Objects.equals(d1.getUpperWarningLimit(), d2.getUpperWarningLimit()) && Objects.equals(d1.getUpperAlarmLimit(), d2.getUpperAlarmLimit()) && Objects.equals(d1.getUpperDisplayLimit(), d2.getUpperDisplayLimit()) && Objects.equals(d1.getLowerCtrlLimit(), d2.getLowerCtrlLimit()) && Objects.equals(d1.getUpperCtrlLimit(), d2.getUpperCtrlLimit())) { return true; } return false; }
ValueUtil { public static boolean displayEquals(Display d1, Display d2) { if (d1 == d2) { return true; } if (Objects.equals(d1.getFormat(), d2.getFormat()) && Objects.equals(d1.getUnits(), d2.getUnits()) && Objects.equals(d1.getLowerDisplayLimit(), d2.getLowerDisplayLimit()) && Objects.equals(d1.getLowerAlarmLimit(), d2.getLowerAlarmLimit()) && Objects.equals(d1.getLowerWarningLimit(), d2.getLowerWarningLimit()) && Objects.equals(d1.getUpperWarningLimit(), d2.getUpperWarningLimit()) && Objects.equals(d1.getUpperAlarmLimit(), d2.getUpperAlarmLimit()) && Objects.equals(d1.getUpperDisplayLimit(), d2.getUpperDisplayLimit()) && Objects.equals(d1.getLowerCtrlLimit(), d2.getLowerCtrlLimit()) && Objects.equals(d1.getUpperCtrlLimit(), d2.getUpperCtrlLimit())) { return true; } return false; } }
ValueUtil { public static boolean displayEquals(Display d1, Display d2) { if (d1 == d2) { return true; } if (Objects.equals(d1.getFormat(), d2.getFormat()) && Objects.equals(d1.getUnits(), d2.getUnits()) && Objects.equals(d1.getLowerDisplayLimit(), d2.getLowerDisplayLimit()) && Objects.equals(d1.getLowerAlarmLimit(), d2.getLowerAlarmLimit()) && Objects.equals(d1.getLowerWarningLimit(), d2.getLowerWarningLimit()) && Objects.equals(d1.getUpperWarningLimit(), d2.getUpperWarningLimit()) && Objects.equals(d1.getUpperAlarmLimit(), d2.getUpperAlarmLimit()) && Objects.equals(d1.getUpperDisplayLimit(), d2.getUpperDisplayLimit()) && Objects.equals(d1.getLowerCtrlLimit(), d2.getLowerCtrlLimit()) && Objects.equals(d1.getUpperCtrlLimit(), d2.getUpperCtrlLimit())) { return true; } return false; } private  ValueUtil(); }
ValueUtil { public static boolean displayEquals(Display d1, Display d2) { if (d1 == d2) { return true; } if (Objects.equals(d1.getFormat(), d2.getFormat()) && Objects.equals(d1.getUnits(), d2.getUnits()) && Objects.equals(d1.getLowerDisplayLimit(), d2.getLowerDisplayLimit()) && Objects.equals(d1.getLowerAlarmLimit(), d2.getLowerAlarmLimit()) && Objects.equals(d1.getLowerWarningLimit(), d2.getLowerWarningLimit()) && Objects.equals(d1.getUpperWarningLimit(), d2.getUpperWarningLimit()) && Objects.equals(d1.getUpperAlarmLimit(), d2.getUpperAlarmLimit()) && Objects.equals(d1.getUpperDisplayLimit(), d2.getUpperDisplayLimit()) && Objects.equals(d1.getLowerCtrlLimit(), d2.getLowerCtrlLimit()) && Objects.equals(d1.getUpperCtrlLimit(), d2.getUpperCtrlLimit())) { return true; } return false; } private  ValueUtil(); static Class<?> typeOf(Object obj); static Alarm alarmOf(Object obj); static Alarm alarmOf(Object value, boolean connected); static Alarm highestSeverityOf(final List<Object> args, final boolean considerNull); static Time latestTimeOf(final List<Object> args); static Time latestValidTimeOrNowOf(final List<Object> args); static Time timeOf(Object obj); static Display displayOf(Object obj); static boolean displayHasValidDisplayLimits(Display display); static Double normalizedNumericValueOf(Object obj); static Double normalize(Number value, Display display); static Double normalize(Number value, Number lowValue, Number highValue); static Double numericValueOf(Object obj); static BufferedImage toImage(VImage vImage); static VImage toVImage(BufferedImage image); static boolean displayEquals(Display d1, Display d2); static void setAlarmSeverityColorMap(Map<AlarmSeverity, Integer> map); static int colorFor(AlarmSeverity severity); static DateTimeFormatter getDefaultTimestampFormat(); static void setDefaultTimestampFormat(DateTimeFormatter defaultTimestampFormat); static NumberFormat getDefaultNumberFormat(); static void setDefaultNumberFormat(NumberFormat defaultNumberFormat); static ValueFormat getDefaultValueFormat(); static void setDefaultValueFormat(ValueFormat defaultValueFormat); static ListNumber numericColumnOf(VTable table, String columnName); static List<String> stringColumnOf(VTable table, String columnName); static List<ArrayDimensionDisplay> defaultArrayDisplay(VNumberArray array); static List<ArrayDimensionDisplay> defaultArrayDisplay(ListInt sizes); static VNumberArray subArray(VNumberArray array, int index); }
ValueUtil { public static boolean displayEquals(Display d1, Display d2) { if (d1 == d2) { return true; } if (Objects.equals(d1.getFormat(), d2.getFormat()) && Objects.equals(d1.getUnits(), d2.getUnits()) && Objects.equals(d1.getLowerDisplayLimit(), d2.getLowerDisplayLimit()) && Objects.equals(d1.getLowerAlarmLimit(), d2.getLowerAlarmLimit()) && Objects.equals(d1.getLowerWarningLimit(), d2.getLowerWarningLimit()) && Objects.equals(d1.getUpperWarningLimit(), d2.getUpperWarningLimit()) && Objects.equals(d1.getUpperAlarmLimit(), d2.getUpperAlarmLimit()) && Objects.equals(d1.getUpperDisplayLimit(), d2.getUpperDisplayLimit()) && Objects.equals(d1.getLowerCtrlLimit(), d2.getLowerCtrlLimit()) && Objects.equals(d1.getUpperCtrlLimit(), d2.getUpperCtrlLimit())) { return true; } return false; } private  ValueUtil(); static Class<?> typeOf(Object obj); static Alarm alarmOf(Object obj); static Alarm alarmOf(Object value, boolean connected); static Alarm highestSeverityOf(final List<Object> args, final boolean considerNull); static Time latestTimeOf(final List<Object> args); static Time latestValidTimeOrNowOf(final List<Object> args); static Time timeOf(Object obj); static Display displayOf(Object obj); static boolean displayHasValidDisplayLimits(Display display); static Double normalizedNumericValueOf(Object obj); static Double normalize(Number value, Display display); static Double normalize(Number value, Number lowValue, Number highValue); static Double numericValueOf(Object obj); static BufferedImage toImage(VImage vImage); static VImage toVImage(BufferedImage image); static boolean displayEquals(Display d1, Display d2); static void setAlarmSeverityColorMap(Map<AlarmSeverity, Integer> map); static int colorFor(AlarmSeverity severity); static DateTimeFormatter getDefaultTimestampFormat(); static void setDefaultTimestampFormat(DateTimeFormatter defaultTimestampFormat); static NumberFormat getDefaultNumberFormat(); static void setDefaultNumberFormat(NumberFormat defaultNumberFormat); static ValueFormat getDefaultValueFormat(); static void setDefaultValueFormat(ValueFormat defaultValueFormat); static ListNumber numericColumnOf(VTable table, String columnName); static List<String> stringColumnOf(VTable table, String columnName); static List<ArrayDimensionDisplay> defaultArrayDisplay(VNumberArray array); static List<ArrayDimensionDisplay> defaultArrayDisplay(ListInt sizes); static VNumberArray subArray(VNumberArray array, int index);  }