public class ElasticsearchVersion extends Object
| Modifier and Type | Method and Description |
|---|---|
int |
getMajor() |
OptionalInt |
getMicro() |
OptionalInt |
getMinor() |
Optional<String> |
getQualifier() |
boolean |
matches(ElasticsearchVersion other) |
static ElasticsearchVersion |
of(String versionString) |
String |
toString() |
public static ElasticsearchVersion of(String versionString)
versionString - A version string following the format x.y.z-qualifier,
where x, y and z are integers and qualifier is a string of word characters (alphanumeric or '_').
Incomplete versions are allowed, for example 7.0 or just 7.ElasticsearchVersion object representing the given version.org.hibernate.search.util.common.SearchException - If the input string doesn't follow the required format.public int getMajor()
public OptionalInt getMinor()
public OptionalInt getMicro()
public boolean matches(ElasticsearchVersion other)
other - A version to be matched against this version.true if the other version matches this version,
i.e. if all the components defined in this version are also defined in the other version with the same value.
false otherwise.
Components that are not defined in this version do not matter.Copyright © 2006-2019 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.