Interface DisplayText

All Superinterfaces:
Comparable<DisplayText>, OsidPrimitive, Serializable
All Known Subinterfaces:
DisplayText

public interface DisplayText extends OsidPrimitive, Comparable<DisplayText>
Supplements the OSID DisplayText interface for Java.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Compares this DisplayText with the specified DisplayText to determine the natural order.
    boolean
    Determines if the given DisplayText is equal to this one.
    int
    Returns a hash code value for this DisplayText based on the langauge type, script type, and string.

    Methods inherited from interface OsidPrimitive

    toString
    Modifier and Type
    Method
    Description
    Returns a string representation of this OsidPrimitive.
  • Method Details

    • compareTo

      int compareTo(DisplayText text)
      Compares this DisplayText with the specified 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.
      Specified by:
      compareTo in interface Comparable<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

      boolean equals(Object obj)
      Determines if the given 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.
      Overrides:
      equals in class Object
      Parameters:
      obj - an object to compare
      Returns:
      true if the given object is equal to this DisplayText, false otherwise
    • hashCode

      int hashCode()
      Returns a hash code value for this DisplayText based on the langauge type, script type, and string.
      Overrides:
      hashCode in class Object
      Returns:
      a hash code value for this object