Term (apache-cassandra API)
Date: 2014-10-21

org.apache.cassandra.cql

## Class Term

- java.lang.Object
- - org.apache.cassandra.cql.Term

-     public class Term
      extends java.lang.Object

  A term parsed from a CQL statement.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `Term()`
    `` | `Term(long value, org.apache.cassandra.cql.TermType type)`
    `` | `Term(java.lang.String text, int type)` Create new Term instance from a string, and an integer that corresponds with the token ID from CQLParser.
    `` | `Term(java.lang.String text, int type, int index)`
    `` | `Term(java.lang.String text, org.apache.cassandra.cql.TermType type)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object obj)`
    `java.nio.ByteBuffer` | `getByteBuffer()` Returns the typed value, serialized to a ByteBuffer.
    `java.nio.ByteBuffer` | `getByteBuffer(AbstractType<?> validator, java.util.List<java.nio.ByteBuffer> variables)` Returns the typed value, serialized to a ByteBuffer according to a comparator/validator.
    `java.lang.String` | `getText()` Returns the text parsed to create this term.
    `org.apache.cassandra.cql.TermType` | `getType()` Obtain the term's type.
    `int` | `hashCode()`
    `boolean` | `isBindMarker()`
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Term

          public Term(java.lang.String text,
              org.apache.cassandra.cql.TermType type)

    - #### Term

          public Term(java.lang.String text,
              int type)

      Create new Term instance from a string, and an integer that corresponds with the token ID from CQLParser.
      Parameters:
        `text` - the text representation of the term.
        `type` - the term's type as an integer token ID.

    - #### Term

          public Term(long value,
              org.apache.cassandra.cql.TermType type)

    - #### Term

          protected Term()

    - #### Term

          public Term(java.lang.String text,
              int type,
              int index)

  - ### Method Detail

    - #### getText

          public java.lang.String getText()

      Returns the text parsed to create this term.
      Returns:
        the string term acquired from a CQL statement.

    - #### getByteBuffer

          public java.nio.ByteBuffer getByteBuffer(AbstractType<?> validator,
                                          java.util.List<java.nio.ByteBuffer> variables)
                                            throws InvalidRequestException

      Returns the typed value, serialized to a ByteBuffer according to a comparator/validator.
      Returns:
        a ByteBuffer of the value.
      Throws:
        `InvalidRequestException` - if unable to coerce the string to its type.

    - #### getByteBuffer

          public java.nio.ByteBuffer getByteBuffer()
                                            throws InvalidRequestException

      Returns the typed value, serialized to a ByteBuffer.
      Returns:
        a ByteBuffer of the value.
      Throws:
        `InvalidRequestException` - if unable to coerce the string to its type.

    - #### getType

          public org.apache.cassandra.cql.TermType getType()

      Obtain the term's type.
      Returns:
        the type

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### isBindMarker

          public boolean isBindMarker()

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### equals

          public boolean equals(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`

Copyright © 2014 The Apache Software Foundation