org.apache.lucene.facet.encoding

## Class SortingIntEncoder

- java.lang.Object
- - org.apache.lucene.facet.encoding.IntEncoder
  - - org.apache.lucene.facet.encoding.IntEncoderFilter
    - - org.apache.lucene.facet.encoding.SortingIntEncoder

    public final class SortingIntEncoder
    extends IntEncoderFilter

An `IntEncoderFilter` which sorts the values to encode in ascending order before encoding them.

WARNING: This API is experimental and might change in incompatible ways in the next release.

### Field Summary

### Fields inherited from class org.apache.lucene.facet.encoding.IntEncoderFilter

`encoder`

### Constructor Summary

Constructors
Constructor and Description
`SortingIntEncoder(IntEncoder encoder)` Initializes with the given encoder.

### Method Summary

Methods
`IntDecoder` `createMatchingDecoder()` Returns an `IntDecoder` which can decode the values that were encoded with this encoder.
`void` `encode(IntsRef values, BytesRef buf)` Encodes the values to the given buffer.
`String` `toString()`

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

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

### Constructor Detail

#### SortingIntEncoder

    public SortingIntEncoder(IntEncoder encoder)

Initializes with the given encoder.

### Method Detail

#### encode

    public void encode(IntsRef values,
              BytesRef buf)

Description copied from class: `IntEncoder`
Encodes the values to the given buffer. Note that the buffer's offset and length are set to 0.

Specified by:
  `encode` in class `IntEncoder`

#### createMatchingDecoder

    public IntDecoder createMatchingDecoder()

Description copied from class: `IntEncoder`
Returns an `IntDecoder` which can decode the values that were encoded with this encoder.

Specified by:
  `createMatchingDecoder` in class `IntEncoder`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`