Class 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 Detail

      • version

        protected String version
      • snapshot

        protected boolean snapshot
      • specialQualifier

        protected boolean specialQualifier
      • splitVersion

        protected Integer[] splitVersion
      • qualifier

        protected String qualifier
    • Constructor Detail

      • FileVersion

        public FileVersion​(String value)
    • Method Detail

      • getQualifier

        public String getQualifier()
      • getSplitVersion

        public Integer[] getSplitVersion()
      • split

        public void split​(String value)
      • 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