This project has retired. For details please refer to its Attic page.
MesosNativeLibrary.Version
JavaScript is disabled on your browser.
Skip navigation links
org.apache.mesos

Class MesosNativeLibrary.Version

  • All Implemented Interfaces:
    java.lang.Comparable<MesosNativeLibrary.Version>
    Enclosing class:
    MesosNativeLibrary


    public static class MesosNativeLibrary.Version
    extends java.lang.Object
    implements java.lang.Comparable<MesosNativeLibrary.Version>
    Represent a 'libmesos' version with Major, Minor, and Patch versions. We use a class here to make it easier to do version compatibility checking. For example:
     
     static Version BugFixVersion = new Version(0, 22, 1);
     public static void myFunction() {
     if (version().compareTo(BugFixVersion) >= 0) {
     // New behavior with bug fix.
     } else {
     // Old behavior for backwards compatibility.
     }
     }
     
     
    • Field Summary

      Fields
      Modifier and Type Field and Description
      long major
      long minor
      long patch
    • Constructor Summary

      Constructors
      Constructor and Description
      Version (long major)
      Version (long major, long minor)
      Version (long major, long minor, long patch)
    • Method Summary

      All Methods
      Modifier and Type Method and Description
      boolean after (MesosNativeLibrary.Version other)
      A helper that is easier to use than 'compareTo', this returns true if 'this' version is strictly 'greater than', not 'greater than or equal to' the 'other' version.
      boolean before (MesosNativeLibrary.Version other)
      A helper that is easier to use than 'compareTo', this returns true if 'this' version is strictly 'less than', not 'less than or equal to' the 'other' version.
      int compareTo (MesosNativeLibrary.Version other)
      Compare this version to an 'other' one.
      boolean equals (MesosNativeLibrary.Version other)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • major

        public final long major
      • minor

        public final long minor
      • patch

        public final long patch
    • Constructor Detail

      • Version

        public Version(long major,
         long minor,
         long patch)
      • Version

        public Version(long major,
         long minor)
      • Version

        public Version(long major)
    • Method Detail

      • compareTo

        public int compareTo(MesosNativeLibrary.Version other)
        Compare this version to an 'other' one. The comparison is done lexicographically. This returns -1 if this version is 'lesser' than the other, 0 if they are equivalent, and 1 if this version is 'greater'.
        Specified by:
        compareTo in interface java.lang.Comparable<MesosNativeLibrary.Version>
      • before

        public boolean before(MesosNativeLibrary.Version other)
        A helper that is easier to use than 'compareTo', this returns true if 'this' version is strictly 'less than', not 'less than or equal to' the 'other' version.
      • after

        public boolean after(MesosNativeLibrary.Version other)
        A helper that is easier to use than 'compareTo', this returns true if 'this' version is strictly 'greater than', not 'greater than or equal to' the 'other' version.
Skip navigation links

AltStyle によって変換されたページ (->オリジナル) /