org.hibernate.search.bridge.builtin

## Class NumberBridge

- java.lang.Object
- - org.hibernate.search.bridge.builtin.NumberBridge

- All Implemented Interfaces:
    IgnoreAnalyzerBridge, StringBridge, TwoWayStringBridge
  Direct Known Subclasses:
    BigDecimalBridge, BigIntegerBridge, ByteBridge, DoubleBridge, FloatBridge, IntegerBridge, LongBridge, ShortBridge

      public abstract class NumberBridge
      extends Object
      implements TwoWayStringBridge, IgnoreAnalyzerBridge

  Base class used to bridge numbers (integer, double, etc.) as strings.

  Note that it is possible to store types as numeric fields using the bridges provided by `NumericFieldBridge`.

  Author:
    Emmanuel Bernard
  See Also:
    `NumericFieldBridge`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NumberBridge()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `objectToString(Object object)` Converts the object representation to a string.

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

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

    - ### Methods inherited from interface org.hibernate.search.bridge.TwoWayStringBridge

      `stringToObject`

- - ### Constructor Detail

    - #### NumberBridge

          public NumberBridge()

  - ### Method Detail

    - #### objectToString

          public String objectToString(Object object)

      Description copied from interface: `StringBridge`
      Converts the object representation to a string.
      Specified by:
        `objectToString` in interface `StringBridge`
      Parameters:
        `object` - The object to transform into a string representation.
      Returns:
        String representation of the given object to be stored in Lucene index. The return string must not be `null`. It can be empty though.

Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved