org.apache.lucene.facet.search

## Class DocValuesCategoryListIterator

- java.lang.Object
- - org.apache.lucene.facet.search.DocValuesCategoryListIterator

All Implemented Interfaces:
  CategoryListIterator

    public class DocValuesCategoryListIterator
    extends Object
    implements CategoryListIterator

A `CategoryListIterator` which reads the ordinals from a `BinaryDocValues`.

### Constructor Summary

Constructors
Constructor and Description
`DocValuesCategoryListIterator(String field, IntDecoder decoder)` Constructs a new `DocValuesCategoryListIterator`.

### Method Summary

Methods
`boolean` `equals(Object o)`
`void` `getOrdinals(int docID, IntsRef ints)` Stores the category ordinals of the given document ID in the given `IntsRef`, starting at position 0 upto `IntsRef.length`.
`int` `hashCode()`
`boolean` `setNextReader(AtomicReaderContext context)` Sets the `AtomicReaderContext` for which `CategoryListIterator.getOrdinals(int, IntsRef)` calls will be made.
`String` `toString()`

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

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

### Constructor Detail

#### DocValuesCategoryListIterator

    public DocValuesCategoryListIterator(String field,
                                 IntDecoder decoder)

Constructs a new `DocValuesCategoryListIterator`.

### Method Detail

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### equals

    public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

#### setNextReader

    public boolean setNextReader(AtomicReaderContext context)
                          throws IOException

Description copied from interface: `CategoryListIterator`
Sets the `AtomicReaderContext` for which `CategoryListIterator.getOrdinals(int, IntsRef)` calls will be made. Returns true iff any of the documents in this reader have category ordinals. This method must be called before any calls to `CategoryListIterator.getOrdinals(int, IntsRef)`.

Specified by:
  `setNextReader` in interface `CategoryListIterator`
Throws:
  `IOException`

#### getOrdinals

    public void getOrdinals(int docID,
                   IntsRef ints)
                     throws IOException

Description copied from interface: `CategoryListIterator`
Stores the category ordinals of the given document ID in the given `IntsRef`, starting at position 0 upto `IntsRef.length`. Grows the `IntsRef` if it is not large enough.

NOTE: if the requested document does not have category ordinals associated with it, `IntsRef.length` is set to zero.

Specified by:
  `getOrdinals` in interface `CategoryListIterator`
Throws:
  `IOException`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`