Package com.jalios.jcms
Class OrDataSelector
- java.lang.Object
-
- com.jalios.jcms.OrDataSelector
-
- All Implemented Interfaces:
DataSelector
,java.util.function.Predicate<Data>
public class OrDataSelector extends java.lang.Object implements DataSelector
This class combines a set ofDataSelector
. The data is selected if it is selected by one of theDataSelector
s.- Version:
- $Revision: 39327 $
- Author:
- Olivier Dedieu
- See Also:
AndDataSelector
,ReverseDataSelector
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
REVISION
-
Constructor Summary
Constructors Constructor Description OrDataSelector(DataSelector... dsArray)
Creates a new OrDataSelector from an array of DataSelectors.OrDataSelector(DataSelector ds1, DataSelector ds2)
Creates a new OrDataSelector from 2 DataSelectors.OrDataSelector(DataSelector ds1, DataSelector ds2, DataSelector ds3)
Creates a new OrDataSelector from 3 DataSelectors.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isSelected(Data data)
Returns true if one of the DataSelector returns true.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.jalios.jcms.DataSelector
test
-
-
-
-
Field Detail
-
REVISION
public static final java.lang.String REVISION
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
OrDataSelector
public OrDataSelector(DataSelector ds1, DataSelector ds2)
Creates a new OrDataSelector from 2 DataSelectors.- Parameters:
ds1
- the first DataSelectords2
- the second DataSelector
-
OrDataSelector
public OrDataSelector(DataSelector ds1, DataSelector ds2, DataSelector ds3)
Creates a new OrDataSelector from 3 DataSelectors.- Parameters:
ds1
- the first DataSelectords2
- the second DataSelectords3
- the third DataSelector
-
OrDataSelector
public OrDataSelector(DataSelector... dsArray)
Creates a new OrDataSelector from an array of DataSelectors.- Parameters:
dsArray
- the array of DataSelector
-
-
Method Detail
-
isSelected
public boolean isSelected(Data data)
Returns true if one of the DataSelector returns true.- Specified by:
isSelected
in interfaceDataSelector
- Parameters:
data
- the data to evaluate.- Returns:
- true if one of the DataSelector returns true. False otherwise.
-
-