Klasse ActionSelector<T extends io.jenkins.plugins.util.BuildAction<?>>

java.lang.Object
io.jenkins.plugins.echarts.ActionSelector<T>
Typparameter:
T - the type of the action to select
Alle implementierten Schnittstellen:
Function<Run<?,?>,Optional<T>>

public class ActionSelector<T extends io.jenkins.plugins.util.BuildAction<?>> extends Object implements Function<Run<?,?>,Optional<T>>
Selects a specific action from the all actions that are attached to the given build. The action is selected by a generic predicate that works on the expected concrete action type. If the baseline build does not contain the action then previous builds will be inspected until the action is found.
  • Konstruktordetails

    • ActionSelector

      public ActionSelector(Class<T> actionType)
      Creates a new instance of ActionSelector. This selector will select the first action of the given type that matches.
      Parameter:
      actionType - the type of the action to select
    • ActionSelector

      public ActionSelector(Class<T> actionType, Predicate<? super T> predicate)
      Creates a new instance of ActionSelector.
      Parameter:
      actionType - the type of the action to select
      predicate - the predicate that selects the action (if there are multiple actions of the same type)
  • Methodendetails

    • apply

      public Optional<T> apply(Run<?,?> baseline)
      Angegeben von:
      apply in Schnittstelle Function<Run<?,?>,Optional<T extends io.jenkins.plugins.util.BuildAction<?>>>
    • findFirst

      public final Optional<T> findFirst(Run<?,?> baseline)
      Searches in the build history for the first action that matches the specified predicate.
      Parameter:
      baseline - the baseline build to start the search from
      Gibt zurück:
      the action, if found