Package com.luciad.model
Class TLcdDefaultObjectInModelFilter
java.lang.Object
com.luciad.model.TLcdDefaultObjectInModelFilter
- All Implemented Interfaces:
ILcdFilter
,Serializable
,Predicate
An
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:
- If the model implements
ILcdIntegerIndexedModel
, the filter callsindexOf(Object)
. - If the model implements
ILcd2DBoundsIndexedModel
and the object isILcdBounded
, the filter callsapplyOnInteract
on the (reduced) bounds of the object. - Otherwise, the filter compares the object with all elements of the model. This approach can be slow for large models, and should be avoided if possible!
- See Also:
-
Constructor Summary
ConstructorDescriptionConstructs a newTLcdDefaultObjectInModelFilter
.Constructs a newTLcdDefaultObjectInModelFilter
for the specified model. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.luciad.util.ILcdFilter
test
-
Constructor Details
-
TLcdDefaultObjectInModelFilter
public TLcdDefaultObjectInModelFilter()Constructs a newTLcdDefaultObjectInModelFilter
. A model should be set on this filter afterwards. -
TLcdDefaultObjectInModelFilter
Constructs a newTLcdDefaultObjectInModelFilter
for the specified model.- Parameters:
aModel
- theILcdModel
in which to search for objects.
-
-
Method Details
-
setModel
Sets theILcdModel
in which to search for objects.- Parameters:
aModel
- theILcdModel
in which to search for objects.
-
accept
Returnstrue
if the specified object is contained in this filter's model,false
otherwise.- Specified by:
accept
in interfaceILcdFilter
- Parameters:
aObject
- the object to be tested.- Returns:
true
if the specified object is contained in this filter's model,false
otherwise.
-