File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
src/main/java/meteordevelopment/meteorclient/utils/misc Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,8 @@ public final class Pool<T> {
1414 private final Queue <T > items = new ArrayDeque <>();
1515 private final Supplier <T > producer ;
1616
17- public Pool (Supplier <T > producer ) {
18- this .producer = producer ;
17+ public Pool (Producer <T > producer ) {
18+ this .producer = producer :: create ;
1919 }
2020
2121 public synchronized T get () {
Original file line number Diff line number Diff line change 1+ /*
2+ * This file is part of the Meteor Client distribution (https://github.com/MeteorDevelopment/meteor-client).
3+ * Copyright (c) Meteor Development.
4+ */
5+
6+ package meteordevelopment .meteorclient .utils .misc ;
7+
8+ public interface Producer <T > {
9+ T create ();
10+ }
You can’t perform that action at this time.
0 commit comments