public class Version
extends java.lang.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(java.lang.Object o) |
int |
getMajor()
Retrieves the major version.
|
int |
getMinor()
Retrieves the minor version.
|
int |
getRevision()
Retrieves the revision version.
|
boolean |
isSnapshot() |
static Version |
parse(java.lang.String version)
Return a new
Version initialized to the value
represented by the specified String |
java.lang.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 java.lang.String toString()
parse(String)
method can create an instance
of Version
with the returned version value string.toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public static Version parse(java.lang.String version)
Version
initialized to the value
represented by the specified String
version
- the string to be parsedjava.lang.NumberFormatException
- if the string does
not contain a valid versionpublic static Version currentVersion()
Copyright © 2010 - 2020 Adobe. All Rights Reserved