Class GenericBuildActionIterator.BuildActionIterable<A extends io.jenkins.plugins.util.BuildAction<?>,R>

java.lang.Object
io.jenkins.plugins.echarts.GenericBuildActionIterator.BuildActionIterable<A,R>
Type Parameters:
A - the type of the action
R - the type of the result
All Implemented Interfaces:
Iterable<edu.hm.hafner.echarts.BuildResult<R>>
Enclosing class:
GenericBuildActionIterator<A extends io.jenkins.plugins.util.BuildAction<?>,R>

public static class GenericBuildActionIterator.BuildActionIterable<A extends io.jenkins.plugins.util.BuildAction<?>,R> extends Object implements Iterable<edu.hm.hafner.echarts.BuildResult<R>>
An iterable that provides an iterator for specific values of build that should be rendered in a trend chart. The build values must be stored in a concrete subclass of BuildAction. The property that contains the build value is selected by a generic predicate.
  • Constructor Details

    • BuildActionIterable

      public BuildActionIterable(Class<A> actionType, A latestAction, Predicate<A> filter, Function<A,R> function)
      Parameters:
      actionType - the type of the action to select
      latestAction - the latest action that will be used as starting point for the sequence of results
      filter - filter that selects the action (if there are multiple actions of the same type)
      function - the supplier that extracts the specific results from the action
    • BuildActionIterable

      public BuildActionIterable(Class<A> actionType, Optional<A> latestAction, Predicate<A> filter, Function<A,R> function)
      Parameters:
      actionType - the type of the action to select
      latestAction - the latest action that will be used as starting point for the sequence of results
      filter - filter that selects the action (if there are multiple actions of the same type)
      function - the supplier that extracts the specific results from the action
  • Method Details

    • iterator

      @NonNull public Iterator<edu.hm.hafner.echarts.BuildResult<R>> iterator()
      Specified by:
      iterator in interface Iterable<A extends io.jenkins.plugins.util.BuildAction<?>>