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

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

# Interface CollectionType

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

All Known Subinterfaces:
  `MapType`

public interface CollectionType extends ObjectType
Represents the type of a collection, an object that can contain element objects.

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
  `boolean`
  `allowsDuplicates()`
  Return whether duplicates are kept in this type of collection.
  `ObjectType`
  `getElementType()`
  Return the type of the elements of this collection type.
  `boolean`
  `isOrdered()`
  Return whether this collection type has ordered elements.

  ### 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

  - ### getElementType

    ObjectType getElementType()
    Return the type of the elements of this collection type.
    Returns:
      the type of the elements of this collection type

  - ### allowsDuplicates

    boolean allowsDuplicates()
    Return whether duplicates are kept in this type of collection. Duplicates are two objects are equal to each other as defined by the `equals` method.
    Returns:
      true if duplicates have been retained, false if duplicates have been eliminated

  - ### isOrdered

    boolean isOrdered()
    Return whether this collection type has ordered elements.
    Returns:
      true if this collection type is ordered, false if not