X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fcds-access-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Faccess%2FABIVersion.java;fp=opendaylight%2Fmd-sal%2Fcds-access-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Faccess%2FABIVersion.java;h=716083156b32aca9fe1e9c0eaf52b4eeddf84e13;hp=84eb8f6c97f3222c91f9fab6037156c9cd42618e;hb=d92bd0e575983b3d6a09a73089ef8f9c62f94eaa;hpb=e085f22bb1934959f9d6f7f4368c1afe964b1e07 diff --git a/opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/ABIVersion.java b/opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/ABIVersion.java index 84eb8f6c97..716083156b 100644 --- a/opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/ABIVersion.java +++ b/opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/ABIVersion.java @@ -136,6 +136,17 @@ public enum ABIVersion implements WritableObject { }; } + /** + * 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);