public class SemanticVersion extends Object implements Comparable<IVersion>, IVersion
| Modifier and Type | Field and Description |
|---|---|
protected com.github.zafarkhaja.semver.Version |
head |
protected int |
significantDigits
Remember the number of significant digits when created.
|
| Modifier | Constructor and Description |
|---|---|
protected |
SemanticVersion() |
|
SemanticVersion(int major) |
|
SemanticVersion(int major,
int minor) |
|
SemanticVersion(int major,
int minor,
int patch) |
|
SemanticVersion(String buf)
Use an external library for parsing.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(IVersion other) |
boolean |
equals(Object o) |
int |
getBuild() |
int |
getMajor() |
int |
getMinor() |
SemanticVersion |
getNextParentVersion()
Strip the lowest number and increment the next one up.
|
SemanticVersion |
getNextVersion()
Get the next logical version in line.
|
int |
getPatch() |
SemanticVersion |
getPrevVersion()
Get the prev logical version in line.
|
com.github.zafarkhaja.semver.Version |
getVersionImpl()
Get the SemVer instance.
|
boolean |
greaterThan(IVersion version) |
boolean |
greaterThanOrEqualTo(IVersion version) |
int |
hashCode() |
boolean |
isStable()
Returns true if this represents a stable release.
|
boolean |
lessThan(IVersion version) |
boolean |
lessThanOrEqualTo(IVersion version) |
protected void |
setVersion(String buf)
Set the version
|
String |
toString() |
protected com.github.zafarkhaja.semver.Version head
protected int significantDigits
public SemanticVersion(String buf)
buf - Version we are trying to parsepublic SemanticVersion(int major)
public SemanticVersion(int major,
int minor)
public SemanticVersion(int major,
int minor,
int patch)
protected SemanticVersion()
protected void setVersion(String buf)
buf - Version we are trying to parsepublic int getMajor()
public int getMinor()
public int getPatch()
public int getBuild()
public int compareTo(IVersion other)
compareTo in interface Comparable<IVersion>public boolean isStable()
public com.github.zafarkhaja.semver.Version getVersionImpl()
public boolean lessThan(IVersion version)
public boolean lessThanOrEqualTo(IVersion version)
public boolean greaterThan(IVersion version)
public boolean greaterThanOrEqualTo(IVersion version)
public SemanticVersion getNextVersion()
public SemanticVersion getPrevVersion()
public SemanticVersion getNextParentVersion()
Copyright © 2018. All rights reserved.