org.semver
Class Version
java.lang.Object
org.semver.Version
- All Implemented Interfaces:
- java.lang.Comparable<Version>
public class Version
- extends java.lang.Object
- implements java.lang.Comparable<Version>
Version following semantic defined by Semantic Versioning document.
Constructor Summary |
Version(int major,
int minor,
int patch)
|
Version(int major,
int minor,
int patch,
java.lang.String special)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Version
public Version(@Nonnegative
int major,
@Nonnegative
int minor,
@Nonnegative
int patch)
Version
public Version(@Nonnegative
int major,
@Nonnegative
int minor,
@Nonnegative
int patch,
@Nonnull
java.lang.String special)
parse
public static Version parse(@Nonnull
java.lang.String version)
- Creates a Version from a string representation. Must match Version#FORMAT.
- Parameters:
version
-
- Returns:
next
public Version next(@Nonnull
Version.Type type)
- Parameters:
type
-
- Returns:
- next
Version
regarding specified Version.Type
delta
public Version.Type delta(@Nonnull
Version other)
- Parameters:
other
-
- Returns:
- most important differing
Version.Type
component between this and another Version
, null if both are same.
isInDevelopment
public boolean isInDevelopment()
isStable
public boolean isStable()
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
equals
public boolean equals(@Nullable
java.lang.Object object)
- Overrides:
equals
in class java.lang.Object
compareTo
public int compareTo(Version other)
- Specified by:
compareTo
in interface java.lang.Comparable<Version>
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2010. All Rights Reserved.