Skip to content
This repository has been archived by the owner on Oct 12, 2021. It is now read-only.

Commit

Permalink
Add TRS and Store handlers
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Berezovskyi <[email protected]>
  • Loading branch information
berezovskyi committed Nov 28, 2017
1 parent 617896e commit 0df07cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 36 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@
*/
public class ChangeHelper {

public static <M> List<Change<M>> changesCreated(Collection<Change<M>> allChanges) {
public static List<Change> changesCreated(Collection<Change> allChanges) {
return allChanges.stream()
.filter(change -> Objects.equals(change.getHistoryResource().getChangeKindEnum(), ChangeKind.CREATION))
.collect(Collectors.toList());
}

public static <M> List<Change<M>> changesModified(Collection<Change<M>> allChanges) {
return allChanges.stream()
.filter(change -> Objects.equals(change.getHistoryResource().getChangeKindEnum(), ChangeKind.MODIFICATION))
public static List<Change> changesModified(Collection<Change> allChanges) {
return allChanges.stream().filter(
change -> Objects.equals(change.getHistoryResource().getChangeKindEnum(), ChangeKind.MODIFICATION))
.collect(Collectors.toList());
}

public static <T> List<HistoryResource> historyFrom(Collection<Change<T>> changes) {
public static List<HistoryResource> historyFrom(Collection<Change> changes) {
return ChangeHelper.mapFn(changes, Change::getHistoryResource);
}

Expand Down

0 comments on commit 0df07cc

Please sign in to comment.