scala.runtime

RichChar

class RichChar extends Proxy with Ordered[Char]

For example, in the following code

   object test extends Application {
     Console.println('\40'.isWhitespace)
     Console.println('\011'.isWhitespace)
     Console.println('1'.asDigit == 1)
     Console.println('A'.asDigit == 10)
   }

the implicit conversions are performed using the predefined view Predef.charWrapper.

attributes: final

Inherits

  1. Ordered
  2. Comparable
  3. Proxy
  4. AnyRef
  5. Any

Value Members

  1. def <(that: Char): Boolean

  2. def <=(that: Char): Boolean

  3. def >(that: Char): Boolean

  4. def >=(that: Char): Boolean

  5. def asDigit: Int

  6. def compare(y: Char): Int

    Result of comparing this with operand that

    Result of comparing this with operand that. returns x where x < 0 iff this < that x == 0 iff this == that x > 0 iff this > that

  7. def compareTo(that: Char): Int

  8. def equals(that: Any): Boolean

    This method is used to compare the receiver object (this) with the argument object (arg0) for equivalence

    This method is used to compare the receiver object (this) with the argument object (arg0) for equivalence.

    The default implementations of this method is an equivalence relation:

    • It is reflexive: for any instance x of type Any, x.equals(x) should return true.
    • It is symmetric: for any instances x and y of type Any, x.equals(y) should return true if and only if y.equals(x) returns true.
    • It is transitive: for any instances x, y, and z of type AnyRef if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.

    If you override this method, you should verify that your implementation remains an equivalence relation. Additionally, when overriding this method it is often necessary to override hashCode to ensure that objects that are "equal" (o1.equals(o2) returns true) hash to the same Int (o1.hashCode.equals(o2.hashCode)).

    definition classes: Proxy ⇐ AnyRef ⇐ Any
  9. def getDirectionality: Byte

  10. def getNumericValue: Int

  11. def getType: Int

  12. def hashCode(): Int

    Returns a hash code value for the object

    Returns a hash code value for the object.

    The default hashing algorithm is platform dependent.

    Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)) yet not be equal (o1.equals(o2) returns false). A degenerate implementation could always return 0. However, it is required that if two objects are equal (o1.equals(o2) returns true) that they have identical hash codes (o1.hashCode.equals(o2.hashCode)). Therefore, when overriding this method, be sure to verify that the behavior is consistent with the equals method.

    definition classes: Proxy ⇐ AnyRef ⇐ Any
  13. def isControl: Boolean

  14. def isDigit: Boolean

  15. def isHighSurrogate: Boolean

  16. def isIdentifierIgnorable: Boolean

  17. def isLetter: Boolean

  18. def isLetterOrDigit: Boolean

  19. def isLowSurrogate: Boolean

  20. def isLower: Boolean

  21. def isLowerCase: Boolean

  22. def isMirrored: Boolean

  23. def isSpaceChar: Boolean

  24. def isTitleCase: Boolean

  25. def isUnicodeIdentifierPart: Boolean

  26. def isUnicodeIdentifierStart: Boolean

  27. def isUpper: Boolean

  28. def isUpperCase: Boolean

  29. def isWhitespace: Boolean

  30. def reverseBytes: Char

  31. def self: Any

  32. def to(y: Char): IndexedSeqView[Char, IndexedSeq[Char]]

    Create a IndexedSeqView[Char] over the characters from 'x' to 'y'

    Create a IndexedSeqView[Char] over the characters from 'x' to 'y'

  33. def toLower: Char

  34. def toLowerCase: Char

  35. def toString(): String

    Returns a string representation of the object

    Returns a string representation of the object.

    The default representation is platform dependent.

    definition classes: Proxy ⇐ AnyRef ⇐ Any
  36. def toTitleCase: Char

  37. def toUpper: Char

  38. def toUpperCase: Char

  39. def until(limit: Char): IndexedSeqView[Char, IndexedSeq[Char]]

    Create a [Char] over the characters from 'x' to 'y' - 1

    Create a [Char] over the characters from 'x' to 'y' - 1

Instance constructors

  1. new RichChar(x: Char)

  2. new RichChar()