Class Version

java.lang.Object
nl.knaw.dans.bagit.domain.Version
All Implemented Interfaces:
Comparable<Version>

public final class Version extends Object implements Comparable<Version>
The version of the bagit specification used to create the bag.
  • Field Details

    • major

      public final int major
    • minor

      public final int minor
    • cachedToString

      private final transient String cachedToString
  • Constructor Details

    • Version

      public Version(int major, int minor)
  • Method Details

    • LATEST_BAGIT_VERSION

      public static Version LATEST_BAGIT_VERSION()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • compareTo

      public int compareTo(Version o)
      Specified by:
      compareTo in interface Comparable<Version>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • isNewer

      public boolean isNewer(Version version)
    • isSameOrNewer

      public boolean isSameOrNewer(Version version)
    • isOlder

      public boolean isOlder(Version version)
    • isSameOrOlder

      public boolean isSameOrOlder(Version version)
    • getMajor

      public int getMajor()
    • getMinor

      public int getMinor()