YATS/Forge Documentation
 All Classes Namespaces Files Functions Variables Enumerator Pages
cpw.mods.fml.common.versioning.ComparableVersion Class Reference
Inheritance diagram for cpw.mods.fml.common.versioning.ComparableVersion:

Public Member Functions

 ComparableVersion (String version)
 
final void parseVersion (String version)
 
int compareTo (ComparableVersion o)
 
String toString ()
 
boolean equals (Object o)
 
int hashCode ()
 

Detailed Description

Generic implementation of version comparison.

Features:

  • mixing of '-' (dash) and '.' (dot) separators,
  • transition between characters and digits also constitutes a separator: 1.0alpha1 => [1, 0, alpha, 1]
  • unlimited number of version components,
  • version components in the text can be digits or strings,
  • strings are checked for well-known qualifiers and the qualifier ordering is used for version ordering. Well-known qualifiers (case insensitive) are:
    • snapshot
    • alpha or a
    • beta or b
    • milestone or m
    • rc or cr
    • (the empty string) or ga or final
    • sp
    Unknown qualifiers are considered after known qualifiers, with lexical order (always case insensitive),
  • a dash usually precedes a qualifier, and is always less important than something preceded with a dot.
See Also
"Versioning" on Maven Wiki
Author
Kenney Westerhof
Hervé Boutemy

Constructor & Destructor Documentation

cpw.mods.fml.common.versioning.ComparableVersion.ComparableVersion ( String  version)

Member Function Documentation

int cpw.mods.fml.common.versioning.ComparableVersion.compareTo ( ComparableVersion  o)
boolean cpw.mods.fml.common.versioning.ComparableVersion.equals ( Object  o)
int cpw.mods.fml.common.versioning.ComparableVersion.hashCode ( )
final void cpw.mods.fml.common.versioning.ComparableVersion.parseVersion ( String  version)
String cpw.mods.fml.common.versioning.ComparableVersion.toString ( )

The documentation for this class was generated from the following file: