public interface DisplayText extends OsidPrimitive, java.lang.Comparable<DisplayText>
Modifier and Type | Method and Description |
---|---|
int |
compareTo(DisplayText text)
Compares this DisplayText with the specified
DisplayText to determine the natural
order. |
boolean |
equals(java.lang.Object obj)
Determines if the given
DisplayText is equal to
this one. |
int |
hashCode()
Returns a hash code value for this
DisplayText
based on the langauge type, script type, and string. |
toString
int compareTo(DisplayText text)
DisplayText
to 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.
If compareTo
a DisplayText 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<DisplayText>
text
- the DisplayText to be comparedjava.lang.ClassCastException
- if the specified DisplayText's type
prevents it from being compared to this DisplayTextboolean equals(java.lang.Object obj)
DisplayText
is equal to
this one. Two DisplayTexts
are equal if their
language types, script types, and strings 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.Object
obj
- an object to compare true
if the given object is equal to
this DisplayText
, false
otherwiseint hashCode()
DisplayText
based on the langauge type, script type, and string.hashCode
in class java.lang.Object