Package opennlp.tools.util
Class Version
java.lang.Object
opennlp.tools.util.Version
The 
Version class represents the OpenNLP Tools library version.
 The version has three parts:
- Major: OpenNLP Tools libraries with a different major version are not interchangeable.
- Minor: OpenNLP Tools libraries with an identical major version, but different minor version may be interchangeable. See release notes for further details.
- Revision: OpenNLP Tools libraries with same major and minor version, but a different revision, are fully interchangeable.
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method Summary
- 
Field Details- 
DEV_VERSION
 
- 
- 
Constructor Details- 
Versionpublic Version(int major, int minor, int revision, boolean snapshot) Initializes aVersioninstance with the provided version elements.- Parameters:
- major- Must not be negative.
- minor- Must not be negative.
- revision- Must not be negative.
- snapshot-- trueif the version represents a snapshot,- falseotherwise.
 
- 
Versionpublic Version(int major, int minor, int revision) Initializes aVersioninstance with the provided version elements. TheVersionwill not be a snapshot, yet a release version.- Parameters:
- major- Must not be negative.
- minor- Must not be negative.
- revision- Must not be negative.
 
 
- 
- 
Method Details- 
getMajorpublic int getMajor()- Returns:
- Retrieves the major version, guaranteed to be non-negative.
 
- 
getMinorpublic int getMinor()- Returns:
- Retrieves the minor version, guaranteed to be non-negative.
 
- 
getRevisionpublic int getRevision()- Returns:
- Retrieves the revision version, guaranteed to be non-negative.
 
- 
isSnapshotpublic boolean isSnapshot()
- 
toStringTheparse(String)method can create an instance ofVersionwith the returned version value string.
- 
hashCodepublic int hashCode()
- 
equals
- 
parse- Parameters:
- version- The string to be parsed
- Returns:
- The version represented by the string value
- Throws:
- NumberFormatException- Thrown if- versiondoes not adhere to a valid form.
 
- 
currentVersion- Returns:
- Retrieves the current version of the OpenNLP Tools library.
 
 
-