Class PluginVersion

java.lang.Object
fr.paris.lutece.utils.sql.PluginVersion
All Implemented Interfaces:
Comparable<PluginVersion>

public class PluginVersion extends Object implements 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 Details

    • isUnstable

      public boolean isUnstable()
    • setUnstable

      public void setUnstable(boolean _isUnstable)
    • components

      public List<Integer> components()
      Returns a copy of the components
      Returns:
      an integer ordered list
    • compareTo

      public int compareTo(PluginVersion o)
      Specified by:
      compareTo in interface Comparable<PluginVersion>
    • of

      public static PluginVersion of(String version)
      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

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

      public boolean isSnapshot()
      Indicates if this version is a snapshot
      Returns:
      true if this version is a snapshot