Package: java.lang

## [Java] Class Character

- java.lang.Character

-     public class Character
      extends Object

  GDK enhancements for Character.

  displayName:
    Character
  receiverFqcn:
    java.lang.Character

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public boolean` | `asBoolean()` Coerce a character to a boolean value.
    `` | `public int` | `compareTo(Number right)` Compares a Character and a Number.
    `` | `public int` | `compareTo(Character right)` Compares two Characters.
    `` | `public Number` | `div(Number right)` Divide a Character by a Number.
    `` | `public Number` | `div(Character right)` Divide one Character by another.
    `` | `public Number` | `intdiv(Number right)` Integer Divide a Character by a Number.
    `` | `public Number` | `intdiv(Character right)` Integer Divide two Characters.
    `` | `public boolean` | `isDigit()` Determines if a character is a digit.
    `` | `public boolean` | `isLetter()` Determines if a character is a letter.
    `` | `public boolean` | `isLetterOrDigit()` Determines if a character is a letter or digit.
    `` | `public boolean` | `isLowerCase()` Determines if a Character is lowercase.
    `` | `public boolean` | `isUpperCase()` Determines if a Character is uppercase.
    `` | `public boolean` | `isWhitespace()` Determines if a character is a whitespace character.
    `` | `public Number` | `minus(Number right)` Subtract a Number from a Character.
    `` | `public Number` | `minus(Character right)` Subtract one Character from another.
    `` | `public Number` | `multiply(Number right)` Multiply a Character by a Number.
    `` | `public Number` | `multiply(Character right)` Multiply two Characters.
    `` | `public Character` | `next()` Increment a Character by one.
    `` | `public Number` | `plus(Number right)` Add a Character and a Number.
    `` | `public Number` | `plus(Character right)` Add one Character to another.
    `` | `public Character` | `previous()` Decrement a Character by one.
    `` | `public char` | `toLowerCase()` Converts the character to lowercase.
    `` | `public char` | `toUpperCase()` Converts the character to uppercase.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `addShutdownHook, any, any, asBoolean, asType, collect, collect, collect, dump, each, eachMatch, eachMatch, eachWithIndex, every, every, find, find, findAll, findAll, findIndexOf, findIndexOf, findIndexValues, findIndexValues, findLastIndexOf, findLastIndexOf, findResult, findResult, findResult, findResult, getAt, getMetaClass, getMetaPropertyValues, getProperties, grep, grep, hasProperty, identity, inject, inject, inspect, invokeMethod, is, isCase, isNotCase, iterator, metaClass, print, print, printf, printf, println, println, println, putAt, respondsTo, respondsTo, setMetaClass, sleep, sleep, split, sprintf, sprintf, stream, tap, toString, use, use, use, with, with, withCloseable, withCloseable, withMethodClosure, withStream, withStream, withTraits`

- - ### Method Detail

    - #### public boolean asBoolean()

      Coerce a character to a boolean value. A character is coerced to false if it's character value is equal to 0, and to true otherwise.

      Returns:
        the boolean value
      Since:
        1.7.0

    - #### public int compareTo(Number right)

      Compares a Character and a Number. The ordinal value of the Character is used in the comparison (the ordinal value is the unicode value which for simple character sets is the ASCII value).

      Parameters:
        `right` - a Number
      Returns:
        the result of the comparison
      Since:
        1.0

    - #### public int compareTo(Character right)

      Compares two Characters. The ordinal values of the Characters are compared (the ordinal value is the unicode value which for simple character sets is the ASCII value).

      Parameters:
        `right` - a Character
      Returns:
        the result of the comparison
      Since:
        1.0

    - #### public Number div(Number right)

      Divide a Character by a Number. The ordinal value of the Character is used in the division (the ordinal value is the unicode value which for simple character sets is the ASCII value).

      Parameters:
        `right` - a Number
      Returns:
        the Number corresponding to the division of left by right
      Since:
        1.0

    - #### public Number div(Character right)

      Divide one Character by another. The ordinal values of the Characters are used in the division (the ordinal value is the unicode value which for simple character sets is the ASCII value).

      Parameters:
        `right` - another Character
      Returns:
        the Number corresponding to the division of left by right
      Since:
        1.0

    - #### public Number intdiv(Number right)

      Integer Divide a Character by a Number. The ordinal value of the Character is used in the division (the ordinal value is the unicode value which for simple character sets is the ASCII value).

      Parameters:
        `right` - a Number
      Returns:
        a Number (an Integer) resulting from the integer division operation
      Since:
        1.0

    - #### public Number intdiv(Character right)

      Integer Divide two Characters. The ordinal values of the Characters are used in the division (the ordinal value is the unicode value which for simple character sets is the ASCII value).

      Parameters:
        `right` - another Character
      Returns:
        a Number (an Integer) resulting from the integer division operation
      Since:
        1.0

    - #### public boolean isDigit()

      Determines if a character is a digit. Synonym for 'Character.isDigit(this)'.

      Returns:
        true if the character is a digit
      See Also:
        Character.isDigit
      Since:
        1.5.7

    - #### public boolean isLetter()

      Determines if a character is a letter. Synonym for 'Character.isLetter(this)'.

      Returns:
        true if the character is a letter
      See Also:
        Character.isLetter
      Since:
        1.5.7

    - #### public boolean isLetterOrDigit()

      Determines if a character is a letter or digit. Synonym for 'Character.isLetterOrDigit(this)'.

      Returns:
        true if the character is a letter or digit
      See Also:
        Character.isLetterOrDigit
      Since:
        1.5.7

    - #### public boolean isLowerCase()

      Determines if a Character is lowercase. Synonym for 'Character.isLowerCase(this)'.

      Returns:
        true if the character is lowercase
      See Also:
        Character.isLowerCase
      Since:
        1.5.7

    - #### public boolean isUpperCase()

      Determines if a Character is uppercase. Synonym for 'Character.isUpperCase(this)'.

      Returns:
        true if the character is uppercase
      See Also:
        Character.isUpperCase
      Since:
        1.5.7

    - #### public boolean isWhitespace()

      Determines if a character is a whitespace character. Synonym for 'Character.isWhitespace(this)'.

      Returns:
        true if the character is a whitespace character
      See Also:
        Character.isWhitespace
      Since:
        1.5.7

    - #### public Number minus(Number right)

      Subtract a Number from a Character. The ordinal value of the Character is used in the subtraction (the ordinal value is the unicode value which for simple character sets is the ASCII value).

      Parameters:
        `right` - a Number
      Returns:
        the Number corresponding to the subtraction of right from left
      Since:
        1.0

    - #### public Number minus(Character right)

      Subtract one Character from another. The ordinal values of the Characters is used in the comparison (the ordinal value is the unicode value which for simple character sets is the ASCII value).

      Parameters:
        `right` - a Character
      Returns:
        the Number corresponding to the subtraction of right from left
      Since:
        1.0

    - #### public Number multiply(Number right)

      Multiply a Character by a Number. The ordinal value of the Character is used in the multiplication (the ordinal value is the unicode value which for simple character sets is the ASCII value).

      Parameters:
        `right` - a Number
      Returns:
        the Number corresponding to the multiplication of left by right
      Since:
        1.0

    - #### public Number multiply(Character right)

      Multiply two Characters. The ordinal values of the Characters are used in the multiplication (the ordinal value is the unicode value which for simple character sets is the ASCII value).

      Parameters:
        `right` - another Character
      Returns:
        the Number corresponding to the multiplication of left by right
      Since:
        1.0

    - #### public Character next()

      Increment a Character by one.

      Returns:
        an incremented Character
      Since:
        1.5.7

    - #### public Number plus(Number right)

      Add a Character and a Number. The ordinal value of the Character is used in the addition (the ordinal value is the unicode value which for simple character sets is the ASCII value). This operation will always create a new object for the result, while the operands remain unchanged.

      Parameters:
        `right` - a Number
      See Also:
        Integer.valueOf
      Returns:
        the Number corresponding to the addition of left and right
      Since:
        1.0

    - #### public Number plus(Character right)

      Add one Character to another. The ordinal values of the Characters are used in the addition (the ordinal value is the unicode value which for simple character sets is the ASCII value). This operation will always create a new object for the result, while the operands remain unchanged.

      Parameters:
        `right` - a Character
      See Also:
        plus(java.lang.Number, java.lang.Character)
      Returns:
        the Number corresponding to the addition of left and right
      Since:
        1.0

    - #### public Character previous()

      Decrement a Character by one.

      Returns:
        a decremented Character
      Since:
        1.5.7

    - #### public char toLowerCase()

      Converts the character to lowercase. Synonym for 'Character.toLowerCase(this)'.

      Returns:
        the lowercase equivalent of the character, if any; otherwise, the character itself.
      See Also:
        Character.isLowerCase
        String.toLowerCase
      Since:
        1.5.7

    - #### public char toUpperCase()

      Converts the character to uppercase. Synonym for 'Character.toUpperCase(this)'.

      Returns:
        the uppercase equivalent of the character, if any; otherwise, the character itself.
      See Also:
        Character.isUpperCase
        String.toUpperCase
      Since:
        1.5.7