Package com.io7m.changelog.core
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 CChangeloglimit(CChangelog changelog, long size)Filter the changelog to only contain thesizemost recent releases.static java.util.Optional<CChangelog>upToAndIncluding(CChangelog changelog, CVersion version, int count)
-
Method Details
-
upToAndIncluding
public static java.util.Optional<CChangelog> upToAndIncluding(CChangelog changelog, CVersion version, int count)- Parameters:
changelog- The current changelogversion- The release versioncount- The maximum number of releases to display- Returns:
- A version of
changelogfeaturing at mostcountreleases up to and includingversion, or nothing if the changelog does not containversion
-
limit
Filter the changelog to only contain thesizemost recent releases.- Parameters:
changelog- The changelogsize- The limit- Returns:
- A new changelog containing only the filtered releases
-