/** {@inheritDoc} */ protected void updateMinMax(EnumFieldValue min, EnumFieldValue max) { if (computeMin) { // nested if to encourage JIT to optimize aware final var? if (null != min) { if (null == this.min || (min.compareTo(this.min) < 0)) { this.min = min; } } } if (computeMax) { // nested if to encourage JIT to optimize aware final var? if (null != max) { if (null == this.max || (max.compareTo(this.max) > 0)) { this.max = max; } } } }
/** {@inheritDoc} */ protected void updateMinMax(EnumFieldValue min, EnumFieldValue max) { if (max != null) { if (max.compareTo(this.max) > 0) this.max = max; } if (this.min == null) this.min = min; else if (this.min.compareTo(min) > 0) this.min = min; }
/** * write {@link EnumFieldValue} as tag+int value+string value * * @param enumFieldValue to write */ public void writeEnumFieldValue(EnumFieldValue enumFieldValue) throws IOException { writeTag(ENUM_FIELD_VALUE); writeInt(enumFieldValue.toInt()); writeStr(enumFieldValue.toString()); }
@Override public long hash(EnumFieldValue v) { return hasher.hashInt(v.toInt().intValue()).asLong(); }