Package org.jppf.job
Class IsOneOfJobSelector
java.lang.Object
org.jppf.job.IsOneOfJobSelector
- All Implemented Interfaces:
Serializable,JobSelector
Performs an "is one of" comparison between a job metadata value or a job name and a set of other comparable values.
- Since:
- 6.2
- Author:
- Laurent Cohen
- See Also:
-
Field Summary
Fields inherited from interface org.jppf.job.JobSelector
ALL_JOBS -
Constructor Summary
ConstructorsConstructorDescriptionIsOneOfJobSelector(Object key, Object... values) Initialize this selector with a job metadata key and an array of values to compare with.IsOneOfJobSelector(Object key, Collection<?> values) Initialize this selector with a job metadata key and a collection of values to compare with.IsOneOfJobSelector(String... values) Initialize this selector with an array of values to compare job names with.IsOneOfJobSelector(Collection<String> values) Initialize this selector with a collection of values to compare job names with. -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermine whether the specified job is accepted by this selector.booleaninthashCode()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jppf.job.JobSelector
and, negate, or, xor
-
Constructor Details
-
IsOneOfJobSelector
Initialize this selector with an array of values to compare job names with.
This constructor is equivalent to callingnew IsOneOfJobSelector(null, Arrays.asList(values)).- Parameters:
values- the alues to compare with.
-
IsOneOfJobSelector
Initialize this selector with a collection of values to compare job names with.
This constructor is equivalent to callingnew IsOneOfJobSelector(null, values).- Parameters:
values- the alues to compare with.
-
IsOneOfJobSelector
Initialize this selector with a job metadata key and an array of values to compare with.
This constructor is equivalent to callingnew IsOneOfJobSelector(key, values).- Parameters:
key- the metadata key of the value to compare with.values- the values to compare with.
-
IsOneOfJobSelector
Initialize this selector with a job metadata key and a collection of values to compare with.- Parameters:
key- the metadata key of the value to compare with.values- the values to compare with.
-
-
Method Details
-
accepts
Description copied from interface:JobSelectorDetermine whether the specified job is accepted by this selector.- Parameters:
job- the job to check.- Returns:
trueif the job is acepted,falseotherwise.
-
hashCode
public int hashCode() -
equals
-