org.hibernate.search.spi

## Interface IndexedTypeMap<V>

-     public interface IndexedTypeMap<V>

  This represents a Map but exposes a more restricted set of operations, allowing us to better encapsulate the contract and perform some optimisations. Also improves type-safety as it enforces usage of IndexedTypeIdentifier as keys, something the standard Map contract doesn't help with. In an ideal world, we will expose less methods than what is currently listed: some methods have been introduced as Deprecated since the beginning as the plan is to eventually remove them; they currently exist merely to allow a practical migration of code to the new approach in smaller, testable steps.
  Author:
    Sanne Grinovero

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `containsKey(IndexedTypeIdentifier type)`
    `Iterable<Map.Entry<IndexedTypeIdentifier,V>>` | `entrySet()`
    `V` | `get(Class<?> legacyPojoClass)` Deprecated. use `get(IndexedTypeIdentifier)`. This method will be removed.
    `V` | `get(IndexedTypeIdentifier type)`
    `boolean` | `isEmpty()`
    `IndexedTypeIdentifier` | `keyFromName(String entityClassName)` Returns a type identified by its unique name.
    `IndexedTypeIdentifier` | `keyFromPojoType(Class<?> clazz)` Returns a type identifier to the passed class.
    `IndexedTypeSet` | `keySet()`
    `void` | `put(IndexedTypeIdentifier type, V typeBinding)` Deprecated. This method will be removed. The implementations will be refactored to become immutable.
    `int` | `size()`
    `Iterable<V>` | `values()`

- - ### Method Detail

    - #### get

          V get(IndexedTypeIdentifier type)

    - #### entrySet

          Iterable<Map.Entry<IndexedTypeIdentifier,V>> entrySet()

    - #### keySet

          IndexedTypeSet keySet()

    - #### size

          int size()

    - #### isEmpty

          boolean isEmpty()

    - #### values

          Iterable<V> values()

    - #### containsKey

          boolean containsKey(IndexedTypeIdentifier type)

    - #### put

          @Deprecated
          void put(IndexedTypeIdentifier type,
                               V typeBinding)

      Deprecated. This method will be removed. The implementations will be refactored to become immutable.
      Parameters:
        `type` - The key to be used.
        `typeBinding` - The value being put in the underlying key/value map.

    - #### get

          @Deprecated
          V get(Class<?> legacyPojoClass)

      Deprecated. use `get(IndexedTypeIdentifier)`. This method will be removed.
      Parameters:
        `legacyPojoClass` - the Class whose type is to be used as a key.
      Returns:
        the value mapped to this key.

    - #### keyFromName

          IndexedTypeIdentifier keyFromName(String entityClassName)

      Returns a type identified by its unique name. This method returns instance from a pool of known types, and will throw an exception when requesting an unknown type name.
      Parameters:
        `entityClassName` -
      Returns:

    - #### keyFromPojoType

          IndexedTypeIdentifier keyFromPojoType(Class<?> clazz)

      Returns a type identifier to the passed class. This method could return a type which is not recognized as an indexed type by other components: it is not coming from a pool of known types.
      Parameters:
        `clazz` -
      Returns:

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