return NormalizedNodeStreamVersion.MAGNESIUM;
}
},
+ /**
+ * Revised ABI version. The messages remain the same as {@link #MAGNESIUM}, the serialization proxies in use are
+ * flat objects without any superclasses.
+ */
+ CHLORINE_SR2(9) {
+ @Override
+ public NormalizedNodeStreamVersion getStreamVersion() {
+ return NormalizedNodeStreamVersion.MAGNESIUM;
+ }
+ },
/**
* Version which is newer than any other version. This version exists purely for testing purposes.
case 6 -> NEON_SR2;
case 7 -> SODIUM_SR1;
case 8 -> MAGNESIUM;
- default -> throw new FutureVersionException(value, MAGNESIUM);
+ case 9 -> CHLORINE_SR2;
+ default -> throw new FutureVersionException(value, CHLORINE_SR2);
};
}
+ /**
+ * Return {@code true} if this version is earier than some {@code other} version.
+ *
+ * @param other Other {@link ABIVersion}
+ * @return {@code true} if {@code other is later}
+ * @throws NullPointerException if {@code other} is null
+ */
+ public boolean lt(final @NonNull ABIVersion other) {
+ return compareTo(other) < 0;
+ }
+
@Override
public void writeTo(final DataOutput out) throws IOException {
out.writeShort(value);