Class CChangelogFilters

java.lang.Object
com.io7m.changelog.core.CChangelogFilters

public final class CChangelogFilters
extends java.lang.Object
Functions to transform and filter changelogs.
  • Method Summary

    Modifier and Type Method Description
    static CChangelog limit​(CChangelog changelog, long size)
    Filter the changelog to only contain the size most recent releases.
    static java.util.Optional<CChangelog> upToAndIncluding​(CChangelog changelog, CVersion version, int count)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • upToAndIncluding

      public static java.util.Optional<CChangelog> upToAndIncluding​(CChangelog changelog, CVersion version, int count)
      Parameters:
      changelog - The current changelog
      version - The release version
      count - The maximum number of releases to display
      Returns:
      A version of changelog featuring at most count releases up to and including version, or nothing if the changelog does not contain version
    • limit

      public static CChangelog limit​(CChangelog changelog, long size)
      Filter the changelog to only contain the size most recent releases.
      Parameters:
      changelog - The changelog
      size - The limit
      Returns:
      A new changelog containing only the filtered releases