Rule Execution Server API

ilog.rules.xml.util
Interface IlrXmlDataTypeMapper.CollectionMapper

All Known Implementing Classes:
IlrXmlCollectionMapperFactory.ArrayListMapper, IlrXmlCollectionMapperFactory.DynamicArrayMapper, IlrXmlCollectionMapperFactory.JavaArrayMapper, IlrXmlCollectionMapperFactory.VectorMapper
Enclosing interface:
IlrXmlDataTypeMapper

public static interface IlrXmlDataTypeMapper.CollectionMapper

Determines how the XML collection elements are mapped on XOM fields, and finally on Java fields.


Method Summary
 void addComponent(Object collection, Object component)
          Adds a new component in the collection
 Object createCollection(Collection components)
          Creates a new instance of the collection knowing its components
 Object createVoidCollection()
          Creates a new instance of a void collection.
 Object getComponent(Object collection, int ix)
          Get a component of the collection knowing its index
 Class getImplementationType()
          Gets the Java implementation class of the collection.
 Iterator getIterator(Object collection)
          Get an iterator on the collection
 int getSize(Object collection)
          Get the size of the collection
 IlrType getXomType()
          Gets the Java collection type used in the XOM
 boolean isAddComponentSupported()
          Determines if the collection accepts to add new component.
 void removeComponent(Object collection, Object component)
          Remove a component of a collection
 

Method Detail

getXomType

IlrType getXomType()
Gets the Java collection type used in the XOM


getImplementationType

Class getImplementationType()
Gets the Java implementation class of the collection.


createVoidCollection

Object createVoidCollection()
Creates a new instance of a void collection.

Returns:
The new collection.

createCollection

Object createCollection(Collection components)
Creates a new instance of the collection knowing its components

Parameters:
components - the components to be added in the new collection
Returns:
the new collection

addComponent

void addComponent(Object collection,
                  Object component)
Adds a new component in the collection

Parameters:
collection - The collection.
component - The component.

isAddComponentSupported

boolean isAddComponentSupported()
Determines if the collection accepts to add new component.

Returns:
true if adding component is accepted.

getComponent

Object getComponent(Object collection,
                    int ix)
Get a component of the collection knowing its index

Parameters:
collection - the collection
ix - index of the component in the collection

removeComponent

void removeComponent(Object collection,
                     Object component)
Remove a component of a collection

Parameters:
collection - the collection
component - the component to be removed from the collection

getIterator

Iterator getIterator(Object collection)
Get an iterator on the collection

Parameters:
collection - the collection to be iterated.
Returns:
an iterator on the collection

getSize

int getSize(Object collection)
Get the size of the collection

Parameters:
collection - the collection to be iterated.
Returns:
the size of the collection

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013