org.apache.lucene.index

## Class TermState

- java.lang.Object
- - org.apache.lucene.index.TermState

- All Implemented Interfaces:
    Cloneable
  Direct Known Subclasses:
    OrdTermState

      public abstract class TermState
      extends Object
      implements Cloneable

  Encapsulates all required internal state to position the associated `TermsEnum` without re-seeking.
  See Also:
    `TermsEnum.seekExact(org.apache.lucene.util.BytesRef, TermState)`, `TermsEnum.termState()`
  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `TermState()` Sole constructor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `TermState` | `clone()`
    `abstract void` | `copyFrom(TermState other)` Copies the content of the given `TermState` to this instance
    `boolean` | `isRealTerm()` Returns true if this term is real (e.g., not an auto-prefix term).
    `String` | `toString()`

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

      `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### TermState

          protected TermState()

      Sole constructor. (For invocation by subclass constructors, typically implicit.)

  - ### Method Detail

    - #### copyFrom

          public abstract void copyFrom(TermState other)

      Copies the content of the given `TermState` to this instance
      Parameters:
        `other` - the TermState to copy

    - #### clone

          public TermState clone()

      Overrides:
        `clone` in class `Object`

    - #### isRealTerm

          public boolean isRealTerm()

      Returns true if this term is real (e.g., not an auto-prefix term).
      NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.