Package fr.paris.lutece.utils.sql
Class PluginVersion
java.lang.Object
fr.paris.lutece.utils.sql.PluginVersion
- All Implemented Interfaces:
Comparable<PluginVersion>
Compares versions. Immutable.
A version is a string such as "1.0.0", i.e. a dot separated list of integers. non-integer components are not supported.
-
Method Summary
Modifier and TypeMethodDescriptionintReturns a copy of the componentsbooleanIndicates if this version is a snapshotbooleanstatic PluginVersionParses and creates a PluginVersion from a version string.voidsetUnstable(boolean _isUnstable) toString()
-
Method Details
-
isUnstable
public boolean isUnstable() -
setUnstable
public void setUnstable(boolean _isUnstable) -
components
Returns a copy of the components- Returns:
- an integer ordered list
-
compareTo
- Specified by:
compareToin interfaceComparable<PluginVersion>
-
of
Parses and creates a PluginVersion from a version string. Might throw a RuntimeException if parsing fails (bad format).- Parameters:
version- the source string- Returns:
- a PluginVersion instance or null if the source is null
-
toString
-
isSnapshot
public boolean isSnapshot()Indicates if this version is a snapshot- Returns:
- true if this version is a snapshot
-