Skip to content

Commit

Permalink
feat(list): 添加快速获取副本列表的方法
Browse files Browse the repository at this point in the history
  • Loading branch information
CarmJos committed Jul 17, 2023
1 parent e4435bf commit 5655722
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ public V get(int index) {
return get().get(index);
}

public @NotNull List<V> copy() {
return new ArrayList<>(get());
}

public <T> @NotNull T handle(Function<List<V>, T> function) {
List<V> list = get();
T result = function.apply(list);
Expand Down

0 comments on commit 5655722

Please sign in to comment.