Interface Type
- All Superinterfaces:
Comparable<Type>, OsidPrimitive, Serializable
- All Known Subinterfaces:
Type
Supplements the OSID Type interface for Java.
-
Method Summary
Modifier and TypeMethodDescriptionintCompares this type with the specifiedTypeto determine the natural order.booleanDetermines if the givenTypeis equal to this one.inthashCode()Returns a hash code value for thisTypebased on the authority, namespace, and identifier.Methods inherited from interface OsidPrimitive
toString
-
Method Details
-
compareTo
Compares this type with the specifiedTypeto 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. IfcompareToan type is zero, thenequals()must betrueand their hash codes must also be equal for consistent behavior. For orderings that may yield inconsistent behavior, an externalComparatorshould be used.- Specified by:
compareToin interfaceComparable<Type>- Parameters:
type- the type to be compared- Returns:
- a negative integer, zero, or a positive integer as this type is less than, equal to, or greater than the specified type
- Throws:
ClassCastException- if the specified type's type prevents it from being compared to this type
-
equals
Determines if the givenTypeis equal to this one. TwoTypesare equal if their authority, namespace, and identifiers are equal. Ifequals()istrue, thencompareTo()must be zero and their hash codes must also be equal for consistent behavior. For orderings that may yield inconsistent behavior, an externalComparatorshould be used. Ifobjis null or if a different interface, this method returnsfalse. -
hashCode
-