Rule Execution Server API

ilog.rules.xml.util
Class IlrXmlCollectionMapperFactory.ArrayListMapper

java.lang.Object
  extended by ilog.rules.xml.util.IlrXmlCollectionMapperFactory.ArrayListMapper
All Implemented Interfaces:
IlrXmlDataTypeMapper.CollectionMapper
Enclosing class:
IlrXmlCollectionMapperFactory

public static class IlrXmlCollectionMapperFactory.ArrayListMapper
extends Object
implements IlrXmlDataTypeMapper.CollectionMapper

Implements a collection mapper using the java.util.ArrayList class.


Constructor Summary
IlrXmlCollectionMapperFactory.ArrayListMapper(IlrObjectModel model)
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlrXmlCollectionMapperFactory.ArrayListMapper

public IlrXmlCollectionMapperFactory.ArrayListMapper(IlrObjectModel model)
Method Detail

getXomType

public IlrType getXomType()
Description copied from interface: IlrXmlDataTypeMapper.CollectionMapper
Gets the Java collection type used in the XOM

Specified by:
getXomType in interface IlrXmlDataTypeMapper.CollectionMapper

getImplementationType

public Class getImplementationType()
Description copied from interface: IlrXmlDataTypeMapper.CollectionMapper
Gets the Java implementation class of the collection.

Specified by:
getImplementationType in interface IlrXmlDataTypeMapper.CollectionMapper

createVoidCollection

public Object createVoidCollection()
Description copied from interface: IlrXmlDataTypeMapper.CollectionMapper
Creates a new instance of a void collection.

Specified by:
createVoidCollection in interface IlrXmlDataTypeMapper.CollectionMapper
Returns:
The new collection.

createCollection

public Object createCollection(Collection components)
Description copied from interface: IlrXmlDataTypeMapper.CollectionMapper
Creates a new instance of the collection knowing its components

Specified by:
createCollection in interface IlrXmlDataTypeMapper.CollectionMapper
Parameters:
components - the components to be added in the new collection
Returns:
the new collection

addComponent

public void addComponent(Object collection,
                         Object component)
Description copied from interface: IlrXmlDataTypeMapper.CollectionMapper
Adds a new component in the collection

Specified by:
addComponent in interface IlrXmlDataTypeMapper.CollectionMapper
Parameters:
collection - The collection.
component - The component.

getComponent

public Object getComponent(Object collection,
                           int ix)
Description copied from interface: IlrXmlDataTypeMapper.CollectionMapper
Get a component of the collection knowing its index

Specified by:
getComponent in interface IlrXmlDataTypeMapper.CollectionMapper
Parameters:
collection - the collection
ix - index of the component in the collection

removeComponent

public void removeComponent(Object collection,
                            Object component)
Description copied from interface: IlrXmlDataTypeMapper.CollectionMapper
Remove a component of a collection

Specified by:
removeComponent in interface IlrXmlDataTypeMapper.CollectionMapper
Parameters:
collection - the collection
component - the component to be removed from the collection

getIterator

public Iterator getIterator(Object collection)
Description copied from interface: IlrXmlDataTypeMapper.CollectionMapper
Get an iterator on the collection

Specified by:
getIterator in interface IlrXmlDataTypeMapper.CollectionMapper
Parameters:
collection - the collection to be iterated.
Returns:
an iterator on the collection

getSize

public int getSize(Object collection)
Description copied from interface: IlrXmlDataTypeMapper.CollectionMapper
Get the size of the collection

Specified by:
getSize in interface IlrXmlDataTypeMapper.CollectionMapper
Parameters:
collection - the collection to be iterated.
Returns:
the size of the collection

isAddComponentSupported

public boolean isAddComponentSupported()
Description copied from interface: IlrXmlDataTypeMapper.CollectionMapper
Determines if the collection accepts to add new component.

Specified by:
isAddComponentSupported in interface IlrXmlDataTypeMapper.CollectionMapper
Returns:
true if adding component is accepted.

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013