FloatEncoder (Lucene 10.5.1 common API)
Description: declaration: package: org.apache.lucene.analysis.payloads, class: FloatEncoder

Package org.apache.lucene.analysis.payloads

# Class FloatEncoder

java.lang.Object
org.apache.lucene.analysis.payloads.AbstractEncoder
org.apache.lucene.analysis.payloads.FloatEncoder

All Implemented Interfaces:
  `PayloadEncoder`

public class FloatEncoder extends AbstractEncoder
Encode a character array Float as a `BytesRef`.

See Also:
  - `PayloadHelper.encodeFloat(float, byte[], int)`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FloatEncoder()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `BytesRef`
  `encode(char[] buffer, int offset, int length)`
  Convert a char array to a `BytesRef`

  ### Methods inherited from class org.apache.lucene.analysis.payloads.AbstractEncoder

  `encode`

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

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

- ## Constructor Details

  - ### FloatEncoder

    public FloatEncoder()

- ## Method Details

  - ### encode

    public BytesRef encode(char[] buffer, int offset, int length)
    Description copied from interface: `PayloadEncoder`
    Convert a char array to a `BytesRef`
    Returns:
      encoded `BytesRef`