Class FileVersion

java.lang.Object
org.nuxeo.common.utils.FileVersion
All Implemented Interfaces:
Comparable<FileVersion>

public class FileVersion extends Object implements Comparable<FileVersion>
Compare versions of files as they are usually set. Maven classifiers are not managed: a classifier will be considered as being part of the version. Maven "SNAPSHOT" keyword is taken in account. Rule is: x-SNAPSHOT < x < x-AnythingButSNAPSHOT < x.y-SNAPSHOT < x.y
Since:
5.5
  • Field Details

    • SNAPSHOT

      protected static final String SNAPSHOT
      See Also:
    • version

      protected String version
    • snapshot

      protected boolean snapshot
    • specialQualifier

      protected boolean specialQualifier
    • splitVersion

      protected Integer[] splitVersion
    • qualifier

      protected String qualifier
  • Constructor Details

    • FileVersion

      public FileVersion(String value)
  • Method Details

    • getQualifier

      public String getQualifier()
    • getSplitVersion

      public Integer[] getSplitVersion()
    • split

      public void split(String value)
    • compareTo

      public int compareTo(FileVersion o)
      Specified by:
      compareTo in interface Comparable<FileVersion>
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • getVersion

      public String getVersion()
    • getVersionWithoutSnapshot

      public String getVersionWithoutSnapshot()
    • greaterThan

      public boolean greaterThan(FileVersion other)
    • lessThan

      public boolean lessThan(FileVersion other)
    • isSnapshot

      public boolean isSnapshot()
    • hasSpecialQualifier

      public boolean hasSpecialQualifier()
      Since:
      5.6
    • getVersionWithoutQualifier

      public String getVersionWithoutQualifier()
      Since:
      5.6
    • toString

      public String toString()
      Overrides:
      toString in class Object