Package org.jppf.job

Class ContainsJobSelector

java.lang.Object
org.jppf.job.ContainsJobSelector
All Implemented Interfaces:
Serializable, JobSelector

public class ContainsJobSelector extends Object
Performs an "contains" comparison between a job metadata value or a job name and an other comparable value.
Since:
6.2
Author:
Laurent Cohen
See Also:
  • Constructor Details

    • ContainsJobSelector

      public ContainsJobSelector(String substring)
      Initialize this selector with a value to compare job names with.
      This constructor is equivalent to calling new ContainsJobSelector(null, substring).
      Parameters:
      substring - the substring to look for.
    • ContainsJobSelector

      public ContainsJobSelector(Object key, String substring)
      Initialize this selector with a job metadata key and a value to compare with.
      Parameters:
      key - the metadata key of the value to compare with.
      substring - the substring to look for.
  • Method Details

    • accepts

      public boolean accepts(JPPFDistributedJob job)
      Description copied from interface: JobSelector
      Determine whether the specified job is accepted by this selector.
      Parameters:
      job - the job to check.
      Returns:
      true if the job is acepted, false otherwise.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object