Interface DisplayText
- All Superinterfaces:
Comparable<DisplayText>, OsidPrimitive, Serializable
- All Known Subinterfaces:
DisplayText
Supplements the OSID DisplayText interface for Java.
-
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(DisplayText text) Compares this DisplayText with the specifiedDisplayTextto determine the natural order.booleanDetermines if the givenDisplayTextis equal to this one.inthashCode()Returns a hash code value for thisDisplayTextbased on the langauge type, script type, and string.Methods inherited from interface OsidPrimitive
toString
-
Method Details
-
compareTo
Compares this DisplayText with the specifiedDisplayTextto determine the natural order. Returns a negative integer, zero, or a positive integer as this DisplayText is less than, equal to, or greater than the specified text. The natural ordering is determined first by the natural ordering of the language type, script type, then ts values. IfcompareToa DisplayText 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<DisplayText>- Parameters:
text- the DisplayText to be compared- Returns:
- a negative integer, zero, or a positive integer as this DisplayText is less than, equal to, or greater than the specified DisplayText
- Throws:
ClassCastException- if the specified DisplayText's type prevents it from being compared to this DisplayText
-
equals
Determines if the givenDisplayTextis equal to this one. TwoDisplayTextsare equal if their language types, script types, and strings 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
-