org.apache.lucene.index

## Class PrefixCodedTerms

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

- All Implemented Interfaces:
    Accountable

      public class PrefixCodedTerms
      extends Object
      implements Accountable

  Prefix codes term instances (prefixes are shared). This is expected to be faster to build than a FST and might also be more compact if there are no common suffixes.
  NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `PrefixCodedTerms.Builder` Builds a PrefixCodedTerms: call add repeatedly, then finish.
    `static class` | `PrefixCodedTerms.TermIterator` An iterator over the list of terms stored in a `PrefixCodedTerms`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)`
    `int` | `hashCode()`
    `PrefixCodedTerms.TermIterator` | `iterator()` Return an iterator over the terms stored in this `PrefixCodedTerms`.
    `long` | `ramBytesUsed()` Return the memory usage of this object in bytes.
    `void` | `setDelGen(long delGen)` Records del gen for this packet.
    `long` | `size()` Return the number of terms stored in this `PrefixCodedTerms`.

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

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

    - ### Methods inherited from interface org.apache.lucene.util.Accountable

      `getChildResources`

- - ### Method Detail

    - #### ramBytesUsed

          public long ramBytesUsed()

      Description copied from interface: `Accountable`
      Return the memory usage of this object in bytes. Negative values are illegal.
      Specified by:
        `ramBytesUsed` in interface `Accountable`

    - #### setDelGen

          public void setDelGen(long delGen)

      Records del gen for this packet.

    - #### iterator

          public PrefixCodedTerms.TermIterator iterator()

      Return an iterator over the terms stored in this `PrefixCodedTerms`.

    - #### size

          public long size()

      Return the number of terms stored in this `PrefixCodedTerms`.

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

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