MapType (Apache Geode 2.0.2)
Description: declaration: package: org.apache.geode.cache.query.types, interface: MapType

Package org.apache.geode.cache.query.types

# Interface MapType

All Superinterfaces:
  `CollectionType`, `DataSerializable`, `ObjectType`, `Serializable`

public interface MapType extends CollectionType
Represents the type of a Map, a collection that contains keys as well as values and maintains an association between key-value pairs. The type of the keys is obtained from the getKeyType method, and the type of the values is obtained from the getElementType method.

Since:
  GemFire 4.0

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface org.apache.geode.DataSerializable

  `DataSerializable.Replaceable`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `StructType`
  `getEntryType()`
  Return the type of the entries in this map.
  `ObjectType`
  `getKeyType()`
  Return the type of the keys in this type of map.

  ### Methods inherited from interface org.apache.geode.cache.query.types.CollectionType

  `allowsDuplicates, getElementType, isOrdered`

  ### Methods inherited from interface org.apache.geode.DataSerializable

  `fromData, toData`

  ### Methods inherited from interface org.apache.geode.cache.query.types.ObjectType

  `getSimpleClassName, isCollectionType, isMapType, isStructType, resolveClass`

- ## Method Details

  - ### getKeyType

    ObjectType getKeyType()
    Return the type of the keys in this type of map.
    Returns:
      the ObjectType of the keys in this type of map.

  - ### getEntryType

    StructType getEntryType()
    Return the type of the entries in this map. In the context of the query language, the entries in a map are structs with key and value fields.
    Returns:
      the type of the entries in this map