Package jenkins.scm.api
Class SCMHeadObserver.Any
- java.lang.Object
-
- jenkins.scm.api.SCMHeadObserver
-
- jenkins.scm.api.SCMHeadObserver.Any
-
- Enclosing class:
- SCMHeadObserver
public static class SCMHeadObserver.Any extends SCMHeadObserver
An observer that picks the first revision it can find.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jenkins.scm.api.SCMHeadObserver
SCMHeadObserver.AllFinished, SCMHeadObserver.Any, SCMHeadObserver.Collector, SCMHeadObserver.Filter<O extends SCMHeadObserver>, SCMHeadObserver.Named, SCMHeadObserver.None, SCMHeadObserver.OneFinished, SCMHeadObserver.Selector, SCMHeadObserver.Wrapped<O extends SCMHeadObserver>
-
-
Constructor Summary
Constructors Constructor Description Any()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SCMRevision
getRevision()
Returns the result.boolean
isObserving()
Returns information about whether the observer wants more results.void
observe(SCMHead head, SCMRevision revision)
Observes a head and current revision.SCMRevision
result()
Returns the result.-
Methods inherited from class jenkins.scm.api.SCMHeadObserver
allOf, any, collect, filter, first, getIncludes, named, none, select
-
-
-
-
Method Detail
-
getRevision
public SCMRevision getRevision()
Returns the result.- Returns:
- the result.
-
result
@CheckForNull public SCMRevision result()
Returns the result.- Returns:
- the result.
-
observe
public void observe(@NonNull SCMHead head, @NonNull SCMRevision revision)
Observes a head and current revision.- Specified by:
observe
in classSCMHeadObserver
- Parameters:
head
- the head.revision
- the revision.
-
isObserving
public boolean isObserving()
Returns information about whether the observer wants more results.- Overrides:
isObserving
in classSCMHeadObserver
- Returns:
true
if the observer is still observing orfalse
to signal that it is ok to stop early.
-
-