public interface Version extends OsidPrimitive, java.lang.Comparable<Version>
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Version version)
Compares this Version with the specified Version to determine
the natural order.
|
boolean |
equals(java.lang.Object obj)
Determines if the given
Version is equal to
this one. |
int |
hashCode()
Returns a hash code value for this
Version based
on the schema and components. |
boolean |
isExclusive(Version version)
Tests if this Version excludes the given version.
|
boolean |
isInclusive(Version version)
Tests if this Version includes the given version.
|
boolean |
isNewer(Version version)
Tests if this Version is more recent than the given Version.
|
boolean |
isOlder(Version version)
Tests if this Version is older than the given Version.
|
toStringboolean isNewer(Version version)
version - the version to comparetrue if this version is more recent,
false otherwiseNullArgumentException - version
is nullUnsupportedException - version scheme types
not compatibleboolean isOlder(Version version)
version - the version to comparetrue if this version is older,
false otherwiseNullArgumentException - version
is nullUnsupportedException - version scheme types
not compatibleboolean isInclusive(Version version)
version - the version to comparetrue if this version includes the given
version, false otherwiseNullArgumentException - version
is nullUnsupportedException - version scheme types
not compatibleboolean isExclusive(Version version)
version - the version to comparetrue if this version excludes the given
version, false otherwiseNullArgumentException - version
is nullUnsupportedException - version scheme types
not compatibleint compareTo(Version version)
compareTo an version is zero, then
equals() must be true and their hash
codes must also be equal for consistent behavior. For
orderings that may yield inconsistent behavior, an external
Comparator should be used.compareTo in interface java.lang.Comparable<Version>version - the version to be comparedjava.lang.ClassCastException - if the specified version's type
prevents it from being compared to this versionboolean equals(java.lang.Object obj)
Version is equal to
this one. Two versions are equal if their schema and
components are equal.
If equals() is true, then
compareTo() must be zero and their hash codes
must also be equal for consistent behavior. For orderings that
may yield inconsistent behavior, an external
Comparator should be used.
If obj is null or if a different interface, this
method returns false.equals in class java.lang.Objectobj - an object to compare true if the given object is equal to
this Version, false
otherwiseint hashCode()
Version based
on the schema and components.hashCode in class java.lang.Object