public class Version extends Object
Version
class represents the OpenNlp Tools library version.
The version has three parts:
Modifier and Type | Field and Description |
---|---|
static Version |
DEV_VERSION |
Constructor and Description |
---|
Version(int major,
int minor,
int revision)
Initializes the current instance with the provided
versions.
|
Version(int major,
int minor,
int revision,
boolean snapshot)
Initializes the current instance with the provided
versions.
|
Modifier and Type | Method and Description |
---|---|
static Version |
currentVersion()
Retrieves the current version of the OpenNlp Tools library.
|
boolean |
equals(Object obj) |
int |
getMajor()
Retrieves the major version.
|
int |
getMinor()
Retrieves the minor version.
|
int |
getRevision()
Retrieves the revision version.
|
int |
hashCode() |
boolean |
isSnapshot() |
static Version |
parse(String version)
|
String |
toString()
Retrieves the version string.
|
public static final Version DEV_VERSION
public Version(int major, int minor, int revision, boolean snapshot)
major
- minor
- revision
- snapshot
- public Version(int major, int minor, int revision)
major
- minor
- revision
- public int getMajor()
public int getMinor()
public int getRevision()
public boolean isSnapshot()
public String toString()
parse(String)
method can create an instance
of Version
with the returned version value string.public static Version parse(String version)
version
- the string to be parsedNumberFormatException
- if the string does
not contain a valid versionpublic static Version currentVersion()
Copyright © 2018 The Apache Software Foundation. All rights reserved.