public class TLcdDefaultObjectInModelFilter extends Object implements ILcdFilter
ILcdFilter
that only accepts objects which are contained in the ILcdModel
set on this
filter.
This filter uses different mechanisms, depending on the interface(s) implemented by the model and object to be tested:
ILcdIntegerIndexedModel
, the filter calls indexOf(Object)
.ILcd2DBoundsIndexedModel
and the object is ILcdBounded
,
the filter calls applyOnInteract
on the (reduced) bounds of the object.Constructor and Description |
---|
TLcdDefaultObjectInModelFilter()
Constructs a new
TLcdDefaultObjectInModelFilter . |
TLcdDefaultObjectInModelFilter(ILcdModel aModel)
Constructs a new
TLcdDefaultObjectInModelFilter for the specified model. |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(Object aObject)
Returns
true if the specified object is contained in this filter's model, false otherwise. |
void |
setModel(ILcdModel aModel)
Sets the
ILcdModel in which to search for objects. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
test
public TLcdDefaultObjectInModelFilter()
TLcdDefaultObjectInModelFilter
.
A model should be set on this filter afterwards.public TLcdDefaultObjectInModelFilter(ILcdModel aModel)
TLcdDefaultObjectInModelFilter
for the specified model.aModel
- the ILcdModel
in which to search for objects.public void setModel(ILcdModel aModel)
ILcdModel
in which to search for objects.aModel
- the ILcdModel
in which to search for objects.public boolean accept(Object aObject)
true
if the specified object is contained in this filter's model, false
otherwise.accept
in interface ILcdFilter
aObject
- the object to be tested.true
if the specified object is contained in this filter's model, false
otherwise.