another overloaded removeProperty

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@14767 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2009-01-24 07:09:22 +00:00
1 parent e9d491a841
commit 672ffe80bc
1 file changed
+17
+17
View File
@@ -314,6 +314,23 @@ public abstract class Job<JobT extends Job<JobT, RunT>, RunT extends Run<JobT, R
save();
}
/**
* 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;
}
/**
* Gets all the job properties configured for this job.
*/