Package java.lang

Examples of java.lang.Character

Unicode Character Representations

The char data type (and therefore the value that a Character object encapsulates) are based on the original Unicode specification, which defined characters as fixed-width 16-bit entities. The Unicode standard has since been changed to allow for characters whose representation requires more than 16 bits. The range of legal code points is now U+0000 to U+10FFFF, known as Unicode scalar value. (Refer to the definition of the U+n notation in the Unicode standard.)

The set of characters from U+0000 to U+FFFF is sometimes referred to as the Basic Multilingual Plane (BMP). Characters whose code points are greater than U+FFFF are called supplementary characters. The Java 2 platform uses the UTF-16 representation in char arrays and in the String and StringBuffer classes. In this representation, supplementary characters are represented as a pair of char values, the first from the high-surrogates range, (\uD800-\uDBFF), the second from the low-surrogates range (\uDC00-\uDFFF).

A char value, therefore, represents Basic Multilingual Plane (BMP) code points, including the surrogate code points, or code units of the UTF-16 encoding. An int value represents all Unicode code points, including supplementary code points. The lower (least significant) 21 bits of int are used to represent Unicode code points and the upper (most significant) 11 bits must be zero. Unless otherwise specified, the behavior with respect to supplementary characters and surrogate char values is as follows:

In the Java SE API documentation, Unicode code point is used for character values in the range between U+0000 and U+10FFFF, and Unicode code unit is used for 16-bit char values that are code units of the UTF-16 encoding. For more information on Unicode terminology, refer to the Unicode Glossary. @author Lee Boynton @author Guy Steele @author Akira Tanaka @since 1.0


      }
      else if(type.getName().equals(CHAR))
      {
        if(value.length() == 1)
        {
          object = new Character(value.charAt(0));
        }
        else
        {
          throw new MethodConfigUserObjectException(
    "Value format not compatible with class");
View Full Code Here


  /* Create input buffer class. */
  m_input = new CInput(m_instream);

  /* Initialize character hash table. */
  m_tokens = new Hashtable();
  m_tokens.put(new Character('$'),new Integer(AT_EOL));
  m_tokens.put(new Character('('),new Integer(OPEN_PAREN));
  m_tokens.put(new Character(')'),new Integer(CLOSE_PAREN));
  m_tokens.put(new Character('*'),new Integer(CLOSURE));
  m_tokens.put(new Character('+'),new Integer(PLUS_CLOSE));
  m_tokens.put(new Character('-'),new Integer(DASH));
  m_tokens.put(new Character('.'),new Integer(ANY));
  m_tokens.put(new Character('?'),new Integer(OPTIONAL));
  m_tokens.put(new Character('['),new Integer(CCL_START));
  m_tokens.put(new Character(']'),new Integer(CCL_END));
  m_tokens.put(new Character('^'),new Integer(AT_BOL));
  m_tokens.put(new Character('{'),new Integer(OPEN_CURLY));
  m_tokens.put(new Character('|'),new Integer(OR));
  m_tokens.put(new Character('}'),new Integer(CLOSE_CURLY));
     
  /* Initialize spec structure. */
  m_spec = new CSpec(this);
 
  /* Nfa to dfa converter. */
 
View Full Code Here

     
    case (int) ' ':
      return (new String("\\ "));
     
    default:
      return ((new Character((char) i)).toString());
    }
      }
View Full Code Here

    m_spec.m_lexeme = m_input.m_line[m_input.m_line_index];
    ++m_input.m_line_index;
        }
    }
 
  code = (Integer) m_tokens.get(new Character(m_spec.m_lexeme));
  if (m_spec.m_in_quote || true == saw_escape)
    {
      m_spec.m_current_token = L;
    }
  else
View Full Code Here

        {

                StatementNode stmt = (StatementNode) nodeFactory.getNode(
                                                                C_NodeTypes.DROP_ALIAS_NODE,
                                                                aliasName,
                                                                new Character(type),
                                                                getContextManager());

                return stmt;
        }
View Full Code Here

                {if (true) return (QueryTreeNode) nodeFactory.getNode(
                                                                C_NodeTypes.CREATE_TABLE_NODE,
                                                                tableName,
                                                                tableElementList,
                                                                properties,
                                                                new Character(lockGranularity),
                                                                getContextManager());}
    throw new Error("Missing return statement in function");
  }
View Full Code Here

        lockGranularity = alterTableAction(tableElementList, changeType, behavior, sequential);
                {if (true) return (QueryTreeNode) nodeFactory.getNode(
                                                        C_NodeTypes.ALTER_TABLE_NODE,
                                                        tableName,
                                                        tableElementList,
                                                        new Character(lockGranularity),
                                                        changeType,
                                                        behavior,
                                                        sequential,
                                                        getContextManager());}
      } else {
View Full Code Here

        {

                StatementNode stmt = (StatementNode) nodeFactory.getNode(
                                                                C_NodeTypes.DROP_ALIAS_NODE,
                                                                aliasName,
                                                                new Character(type),
                                                                getContextManager());

                return stmt;
        }
View Full Code Here

                                {if (true) return (StatementNode) nodeFactory.getNode(
                                                                                C_NodeTypes.CREATE_TABLE_NODE,
                                                                                tableName,
                                                                                tableElementList,
                                                                                properties,
                                                                                new Character(lockGranularity),
                                                                                getContextManager());}
    } else {
      switch (jj_nt.kind) {
      case AS:
      case LEFT_PAREN:
View Full Code Here

      lockGranularity = alterTableAction(tableElementList, changeType, behavior, sequential);
                {if (true) return (StatementNode) nodeFactory.getNode(
                                                        C_NodeTypes.ALTER_TABLE_NODE,
                                                        tableName,
                                                        tableElementList,
                                                        new Character(lockGranularity),
                                                        changeType,
                                                        behavior,
                                                        sequential,
                                                        getContextManager());}
      break;
View Full Code Here

TOP

Related Classes of java.lang.Character

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.