Example #1
0
 /**
  * Removes the property of the given type.
  *
  * @return The property that was just removed.
  * @since 1.279
  */
 public <T extends JobProperty> T removeProperty(Class<T> clazz) throws IOException {
   for (JobProperty<? super JobT> p : properties) {
     if (clazz.isInstance(p)) {
       removeProperty(p);
       return clazz.cast(p);
     }
   }
   return null;
 }
Example #2
0
 /** Gets the specific property, or null if the propert is not configured for this job. */
 public <T extends JobProperty> T getProperty(Class<T> clazz) {
   for (JobProperty p : properties) {
     if (clazz.isInstance(p)) return clazz.cast(p);
   }
   return null;
 }