public class IlrSelector
extends java.lang.Object
To implement a selector, implement a accepts(<the class to accept>) method
returning a boolean for each class to be visited. This selector implementation is generic,
and thus you can write the accepts method only for the classes you are interested in.
Also, it supports inheritance by applying the most specific accepts method that is provided.
If there is no implementation of the accepts method for the current object's class,
the accepts(Object) method will be called. By default it returns false.
To use this selector, call the isAccepted method on the object you want to test.
| Modifier and Type | Class and Description |
|---|---|
static class |
IlrSelector.And
And selector, a selector that accepts an object if both underlying selectors accept it.
|
static class |
IlrSelector.Not
Not selector, a selector that accepts the objects refused by an underlying selector.
|
static class |
IlrSelector.Or
Or selector, a selector that accepts an object if one of the two underlying selectors accepts it.
|
| Constructor and Description |
|---|
IlrSelector() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accepts(java.lang.Object o)
Default accepts method called whenever there is none more precise.
|
boolean |
areAccepted(java.util.Collection collection)
Method to call to test the acceptance of each element of a collection.
|
boolean |
isAccepted(java.lang.Object o)
Tests if an object is acceptable.
|
public boolean areAccepted(java.util.Collection collection)
collection - A collection. It can be null. In this case, the method returns true.True if the parameter is null, empty or all its objects are accepted.public boolean isAccepted(java.lang.Object o)
o - The object to test. If it is null, this method returns false.True if the object is accepted, or False if the object is null or not accepted.public boolean accepts(java.lang.Object o)
false but can be redefined.o - © Copyright IBM Corp. 1987, 2017