Package org.jppf.job

Class AtMostJobSelector

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

public class AtMostJobSelector extends Object
Performs a "at most" 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

    • AtMostJobSelector

      public AtMostJobSelector(String operand)
      Initialize this selector with a value to compare job names with.
      Parameters:
      operand - the operand to compare with job names.
    • AtMostJobSelector

      public AtMostJobSelector(Object key, Comparable<?> operand)
      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.
      operand - the operand to compare with.
  • 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