Skip to content
Permalink
Browse files

used common method for linking chains

  • Loading branch information...
maciejmikosik committed Feb 22, 2018
1 parent 2acab05 commit ddb1ad2768d2d049590300e1640242bf31242bf2
Showing with 1 addition and 10 deletions.
  1. +1 −10 main/java/org/testory/plumbing/history/FilteredHistory.java
@@ -47,16 +47,7 @@ private void update() {
if (processing.size() == 0) {
filtered = filtering.reverse();
} else {
filtered = link(filtered, filtering);
filtered = filtered.addAll(filtering);
}
}

/** TODO create Chain.link */
private static <T> Chain<T> link(Chain<? extends T> first, Chain<? extends T> second) {
Chain<T> linking = (Chain<T>) first;
for (T element : second) {
linking = linking.add(element);
}
return linking;
}
}

0 comments on commit ddb1ad2

Please sign in to comment.
You can’t perform that action at this time.