Package opennlp.tools.util
Klasse 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.
-
Feldübersicht
Felder -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
-
Felddetails
-
DEV_VERSION
-
-
Konstruktordetails
-
Version
public Version(int major, int minor, int revision, boolean snapshot) Initializes aVersion
instance with the provided version elements.- Parameter:
major
- Must not be negative.minor
- Must not be negative.revision
- Must not be negative.snapshot
-true
if the version represents a snapshot,false
otherwise.
-
Version
public Version(int major, int minor, int revision) Initializes aVersion
instance with the provided version elements. TheVersion
will not be a snapshot, yet a release version.- Parameter:
major
- Must not be negative.minor
- Must not be negative.revision
- Must not be negative.
-
-
Methodendetails
-
getMajor
public int getMajor()- Gibt zurück:
- Retrieves the major version, guaranteed to be non-negative.
-
getMinor
public int getMinor()- Gibt zurück:
- Retrieves the minor version, guaranteed to be non-negative.
-
getRevision
public int getRevision()- Gibt zurück:
- Retrieves the revision version, guaranteed to be non-negative.
-
isSnapshot
public boolean isSnapshot() -
toString
Theparse(String)
method can create an instance ofVersion
with the returned version value string. -
hashCode
public int hashCode() -
equals
-
parse
- Parameter:
version
- The string to be parsed- Gibt zurück:
- The version represented by the string value
- Löst aus:
NumberFormatException
- Thrown ifversion
does not adhere to a valid form.
-
currentVersion
- Gibt zurück:
- Retrieves the current version of the OpenNLP Tools library.
-