public interface Type extends OsidPrimitive, java.lang.Comparable<Type>
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Type type)
Compares this type with the specified
Type to
determine the natural order. |
boolean |
equals(java.lang.Object obj)
Determines if the given
Type is equal to this
one. |
int |
hashCode()
Returns a hash code value for this
Type based on
the authority, namespace, and identifier. |
toStringint compareTo(Type type)
Type to
determine the natural order. Returns a negative integer, zero,
or a positive integer as this type is less than, equal to,
or greater than the specified type.
The natural ordering is determined first by the natural
ordering of the authority, namespace, and identifier.
If compareTo an type 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<Type>type - the type to be comparedjava.lang.ClassCastException - if the specified type's type
prevents it from being compared to this typeboolean equals(java.lang.Object obj)
Type is equal to this
one. Two Types are equal if their authority,
namespace, and identifiers 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 Type, false
otherwiseint hashCode()
Type based on
the authority, namespace, and identifier.hashCode in class java.lang.Object