## org.apache.lucene.facet.associations
Class CategoryFloatAssociation

    java.lang.Object
      org.apache.lucene.facet.associations.CategoryFloatAssociation

All Implemented Interfaces:
  CategoryAssociation

    public class CategoryFloatAssociation

extends Object
implements CategoryAssociation

A `CategoryAssociation` that associates a float with a category.

Field Summary
`static String` `ASSOCIATION_LIST_ID`

Constructor Summary
`CategoryFloatAssociation()`
`CategoryFloatAssociation(float value)`

Method Summary
`void` `deserialize(ByteArrayDataInput input)` Deserializes the association value from the given `DataInput`.
`String` `getCategoryListID()` Returns the ID of the category association.
`float` `getValue()` Returns the value associated with a category.
`int` `maxBytesNeeded()` Returns the maximum bytes needed to encode the association value.
`void` `serialize(ByteArrayDataOutput output)` Serializes the associated value into the given `DataOutput`.
`String` `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### ASSOCIATION_LIST_ID

    public static final String ASSOCIATION_LIST_ID

See Also:
  Constant Field Values

Constructor Detail

### CategoryFloatAssociation

    public CategoryFloatAssociation()

### CategoryFloatAssociation

    public CategoryFloatAssociation(float value)

Method Detail

### serialize

    public void serialize(ByteArrayDataOutput output)

  Description copied from interface: `CategoryAssociation`
  Serializes the associated value into the given `DataOutput`.

  Specified by:
    `serialize` in interface `CategoryAssociation`

### deserialize

    public void deserialize(ByteArrayDataInput input)

  Description copied from interface: `CategoryAssociation`
  Deserializes the association value from the given `DataInput`.

  Specified by:
    `deserialize` in interface `CategoryAssociation`

### maxBytesNeeded

    public int maxBytesNeeded()

  Description copied from interface: `CategoryAssociation`
  Returns the maximum bytes needed to encode the association value.

  Specified by:
    `maxBytesNeeded` in interface `CategoryAssociation`

### getCategoryListID

    public String getCategoryListID()

  Description copied from interface: `CategoryAssociation`
  Returns the ID of the category association. The ID is used as e.g. the term's text under which to encode the association values.

  Specified by:
    `getCategoryListID` in interface `CategoryAssociation`

### getValue

    public float getValue()

  Returns the value associated with a category. If you used `CategoryFloatAssociation()`, you should call `deserialize(ByteArrayDataInput)` before calling this method, or otherwise the value returned is undefined.

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

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