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
ILcd2DBoundsIndexedModeland the object isILcdBounded, the filter callsapplyOnInteracton 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
ConstructorsConstructorDescriptionConstructs a newTLcdDefaultObjectInModelFilter.Constructs a newTLcdDefaultObjectInModelFilterfor the specified model. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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 newTLcdDefaultObjectInModelFilterfor the specified model.- Parameters:
aModel- theILcdModelin which to search for objects.
-
-
Method Details
-
setModel
Sets theILcdModelin which to search for objects.- Parameters:
aModel- theILcdModelin which to search for objects.
-
accept
Returnstrueif the specified object is contained in this filter's model,falseotherwise.- Specified by:
acceptin interfaceILcdFilter- Parameters:
aObject- the object to be tested.- Returns:
trueif the specified object is contained in this filter's model,falseotherwise.
-