Class SemVer
- java.lang.Object
-
- org.opendaylight.yangtools.concepts.SemVer
-
- All Implemented Interfaces:
Serializable
,Comparable<SemVer>
@Beta public final class SemVer extends Object implements Comparable<SemVer>, Serializable
A single version according to Semantic Versioning.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(SemVer other)
static @NonNull SemVer
create(@org.checkerframework.checker.index.qual.NonNegative int major)
static @NonNull SemVer
create(@org.checkerframework.checker.index.qual.NonNegative int major, @org.checkerframework.checker.index.qual.NonNegative int minor)
static @NonNull SemVer
create(@org.checkerframework.checker.index.qual.NonNegative int major, @org.checkerframework.checker.index.qual.NonNegative int minor, @org.checkerframework.checker.index.qual.NonNegative int patch)
boolean
equals(Object obj)
int
getMajor()
Return the major version number.int
getMinor()
Return the minor version number.int
getPatch()
Return the patch version number.int
hashCode()
String
toString()
static @NonNull SemVer
valueOf(@NonNull String str)
-
-
-
Method Detail
-
create
public static @NonNull SemVer create(@org.checkerframework.checker.index.qual.NonNegative int major)
-
create
public static @NonNull SemVer create(@org.checkerframework.checker.index.qual.NonNegative int major, @org.checkerframework.checker.index.qual.NonNegative int minor)
-
create
public static @NonNull SemVer create(@org.checkerframework.checker.index.qual.NonNegative int major, @org.checkerframework.checker.index.qual.NonNegative int minor, @org.checkerframework.checker.index.qual.NonNegative int patch)
-
getMajor
public int getMajor()
Return the major version number.- Returns:
- major version number
-
getMinor
public int getMinor()
Return the minor version number.- Returns:
- minor version number
-
getPatch
public int getPatch()
Return the patch version number.- Returns:
- patch version number
-
compareTo
public int compareTo(SemVer other)
- Specified by:
compareTo
in interfaceComparable<SemVer>
-
-