Package org.nuxeo.common.utils
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 Summary
Fields Modifier and Type Field Description protected String
qualifier
protected boolean
snapshot
protected static String
SNAPSHOT
protected boolean
specialQualifier
protected Integer[]
splitVersion
protected String
version
-
Constructor Summary
Constructors Constructor Description FileVersion(String value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(FileVersion o)
boolean
equals(Object o)
String
getQualifier()
Integer[]
getSplitVersion()
String
getVersion()
String
getVersionWithoutQualifier()
String
getVersionWithoutSnapshot()
boolean
greaterThan(FileVersion other)
boolean
hasSpecialQualifier()
boolean
isSnapshot()
boolean
lessThan(FileVersion other)
void
split(String value)
String
toString()
-
-
-
Field Detail
-
SNAPSHOT
protected static final String SNAPSHOT
- See Also:
- Constant Field Values
-
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)
-
compareTo
public int compareTo(FileVersion o)
- Specified by:
compareTo
in interfaceComparable<FileVersion>
-
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
-
-