Package hudson.util

Class RunList<R extends Run>

    • Constructor Detail

      • RunList

        public RunList()
      • RunList

        public RunList​(Job j)
      • RunList

        public RunList​(View view)
    • Method Detail

      • fromJobs

        public static <J extends Job<J,​R>,​R extends Run<J,​R>> RunList<R> fromJobs​(Iterable<? extends J> jobs)
        Creates a a RunList combining all the runs of the supplied jobs.
        Type Parameters:
        J - the base class of job.
        R - the base class of run.
        Parameters:
        jobs - the supplied jobs.
        Returns:
        the run list.
        Since:
        2.37
      • getFirstBuild

        @Deprecated
        public R getFirstBuild()
        Deprecated.
        see size() for why this violates lazy-loading
      • getLastBuild

        public R getLastBuild()
      • filter

        public RunList<R> filter​(Predicate<R> predicate)
        Returns elements that satisfy the given predicate. Warning: this method mutates the original list and then returns it.
        Since:
        2.279
      • filter

        @Deprecated
        public RunList<R> filter​(com.google.common.base.Predicate<R> predicate)
        Deprecated.
        Returns elements that satisfy the given predicate. Warning: this method mutates the original list and then returns it.
        Since:
        1.544
      • limit

        public RunList<R> limit​(int n)
        Return only the most recent builds. Warning: this method mutates the original list and then returns it.
        Parameters:
        n - a count
        Returns:
        the n most recent builds
        Since:
        1.507
      • failureOnly

        public RunList<R> failureOnly()
        Filter the list to non-successful builds only. Warning: this method mutates the original list and then returns it.
      • overThresholdOnly

        public RunList<R> overThresholdOnly​(Result threshold)
        Filter the list to builds above threshold. Warning: this method mutates the original list and then returns it.
        Since:
        1.517
      • completedOnly

        public RunList<R> completedOnly()
        Filter the list to completed builds. Warning: this method mutates the original list and then returns it.
        Since:
        1.561
      • node

        public RunList<R> node​(Node node)
        Filter the list to builds on a single node only Warning: this method mutates the original list and then returns it.
      • regressionOnly

        public RunList<R> regressionOnly()
        Filter the list to regression builds only. Warning: this method mutates the original list and then returns it.
      • byTimestamp

        public RunList<R> byTimestamp​(long start,
                                      long end)
        Filter the list by timestamp. s&lt=;e. Warning: this method mutates the original list and then returns it.
      • newBuilds

        public RunList<R> newBuilds()
        Reduce the size of the list by only leaving relatively new ones. This also removes on-going builds, as RSS cannot be used to publish information if it changes. Warning: this method mutates the original list and then returns it.