站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss RULES 4.0.0.11754MR2 API 英文版文档

CompositeCollection.CollectionMutator (Drools 4.0.0.11754MR2 API) - JBoss RULES 4.0.0.11754MR2 API 英文版文档


org.drools.util
Interface CompositeCollection.CollectionMutator

Enclosing class:
CompositeCollection

public static interface CompositeCollection.CollectionMutator

Pluggable strategy to handle changes to the composite.


Method Summary
 boolean add(CompositeCollection composite, Collection[] collections, Object obj)
          Called when an object is to be added to the composite.
 boolean addAll(CompositeCollection composite, Collection[] collections, Collection coll)
          Called when a collection is to be added to the composite.
 boolean remove(CompositeCollection composite, Collection[] collections, Object obj)
          Called when an object is to be removed to the composite.
 

Method Detail

add

boolean add(CompositeCollection composite,
            Collection[] collections,
            Object obj)
Called when an object is to be added to the composite.

Parameters:
composite - the CompositeCollection being changed
collections - all of the Collection instances in this CompositeCollection
obj - the object being added
Returns:
true if the collection is changed
Throws:
UnsupportedOperationException - if add is unsupported
ClassCastException - if the object cannot be added due to its type
NullPointerException - if the object cannot be added because its null
IllegalArgumentException - if the object cannot be added

addAll

boolean addAll(CompositeCollection composite,
               Collection[] collections,
               Collection coll)
Called when a collection is to be added to the composite.

Parameters:
composite - the CompositeCollection being changed
collections - all of the Collection instances in this CompositeCollection
coll - the collection being added
Returns:
true if the collection is changed
Throws:
UnsupportedOperationException - if add is unsupported
ClassCastException - if the object cannot be added due to its type
NullPointerException - if the object cannot be added because its null
IllegalArgumentException - if the object cannot be added

remove

boolean remove(CompositeCollection composite,
               Collection[] collections,
               Object obj)
Called when an object is to be removed to the composite.

Parameters:
composite - the CompositeCollection being changed
collections - all of the Collection instances in this CompositeCollection
obj - the object being removed
Returns:
true if the collection is changed
Throws:
UnsupportedOperationException - if removed is unsupported
ClassCastException - if the object cannot be removed due to its type
NullPointerException - if the object cannot be removed because its null
IllegalArgumentException - if the object cannot be removed


Copyright © 2001-2007 JBoss Inc.. All Rights Reserved.