## org.apache.lucene.analysis.shingle
Class ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec

    java.lang.Object
      org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TokenSettingsCodec
          org.apache.lucene.analysis.shingle.ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec

Enclosing class:
  ShingleMatrixFilter

    public static class ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec

extends ShingleMatrixFilter.TokenSettingsCodec

A full featured codec not to be used for something serious. It takes complete control of payload for weight and the bit flags for positioning in the matrix. Mainly exist for demonstrational purposes.

Constructor Summary
`ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec()`

Method Summary
`ShingleMatrixFilter.TokenPositioner` `getTokenPositioner(org.apache.lucene.analysis.Token token)` Retrieves information on how a `Token` is to be inserted to a `ShingleMatrixFilter.Matrix`.
`float` `getWeight(org.apache.lucene.analysis.Token token)` Returns a 32 bit float from the payload, or 1f it null.
`void` `setTokenPositioner(org.apache.lucene.analysis.Token token, ShingleMatrixFilter.TokenPositioner tokenPositioner)` Sets the TokenPositioner as token flags int value.
`void` `setWeight(org.apache.lucene.analysis.Token token, float weight)` Stores a 32 bit float in the payload, or set it to null if 1f;

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

Constructor Detail

### ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec

    public ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec()

Method Detail

### getTokenPositioner

    public ShingleMatrixFilter.TokenPositioner getTokenPositioner(org.apache.lucene.analysis.Token token)
                                                           throws IOException

  Description copied from class: `ShingleMatrixFilter.TokenSettingsCodec`
  Retrieves information on how a `Token` is to be inserted to a `ShingleMatrixFilter.Matrix`.

  Specified by:
    `getTokenPositioner` in class `ShingleMatrixFilter.TokenSettingsCodec`
  Parameters:
    `token` -
  Returns:
    the token flags int value as TokenPosition
  Throws:
    `IOException`

### setTokenPositioner

    public void setTokenPositioner(org.apache.lucene.analysis.Token token,
                                   ShingleMatrixFilter.TokenPositioner tokenPositioner)

  Sets the TokenPositioner as token flags int value.

  Specified by:
    `setTokenPositioner` in class `ShingleMatrixFilter.TokenSettingsCodec`
  Parameters:
    `token` -
    `tokenPositioner` -

### getWeight

    public float getWeight(org.apache.lucene.analysis.Token token)

  Returns a 32 bit float from the payload, or 1f it null.

  Specified by:
    `getWeight` in class `ShingleMatrixFilter.TokenSettingsCodec`
  Parameters:
    `token` -
  Returns:
    32 bit float

### setWeight

    public void setWeight(org.apache.lucene.analysis.Token token,
                          float weight)

  Stores a 32 bit float in the payload, or set it to null if 1f;

  Specified by:
    `setWeight` in class `ShingleMatrixFilter.TokenSettingsCodec`
  Parameters:
    `token` -
    `weight` -