diff options
Diffstat (limited to 'dice/src/main/java/bjc/dicelang/neodice/diepool')
4 files changed, 21 insertions, 21 deletions
diff --git a/dice/src/main/java/bjc/dicelang/neodice/diepool/ExpandDiePool.java b/dice/src/main/java/bjc/dicelang/neodice/diepool/ExpandDiePool.java index 7c58e72..97acc79 100644 --- a/dice/src/main/java/bjc/dicelang/neodice/diepool/ExpandDiePool.java +++ b/dice/src/main/java/bjc/dicelang/neodice/diepool/ExpandDiePool.java @@ -6,13 +6,13 @@ import java.util.stream.*; import bjc.dicelang.neodice.*; -public class ExpandDiePool<SideType> implements IDiePool<SideType> { - private final IDie<SideType> contained; +public class ExpandDiePool<SideType> implements DiePool<SideType> { + private final Die<SideType> contained; - private final BiFunction<IDie<SideType>, Random, Stream<SideType>> expander; + private final BiFunction<Die<SideType>, Random, Stream<SideType>> expander; - public ExpandDiePool(IDie<SideType> contained, - BiFunction<IDie<SideType>, Random, Stream<SideType>> expander) { + public ExpandDiePool(Die<SideType> contained, + BiFunction<Die<SideType>, Random, Stream<SideType>> expander) { this.contained = contained; this.expander = expander; } diff --git a/dice/src/main/java/bjc/dicelang/neodice/diepool/FixedDiePool.java b/dice/src/main/java/bjc/dicelang/neodice/diepool/FixedDiePool.java index a536f62..4950407 100644 --- a/dice/src/main/java/bjc/dicelang/neodice/diepool/FixedDiePool.java +++ b/dice/src/main/java/bjc/dicelang/neodice/diepool/FixedDiePool.java @@ -5,17 +5,17 @@ import java.util.stream.*; import bjc.dicelang.neodice.*; -public class FixedDiePool<SideType> implements IDiePool<SideType> { - private final List<IDie<SideType>> dice; +public class FixedDiePool<SideType> implements DiePool<SideType> { + private final List<Die<SideType>> dice; - public FixedDiePool(List<IDie<SideType>> dice) { + public FixedDiePool(List<Die<SideType>> dice) { this.dice = dice; } @SafeVarargs - public FixedDiePool(IDie<SideType>...dice) { + public FixedDiePool(Die<SideType>...dice) { this.dice = new ArrayList<>(dice.length); - for (IDie<SideType> die : dice) { + for (Die<SideType> die : dice) { this.dice.add(die); } } @@ -26,7 +26,7 @@ public class FixedDiePool<SideType> implements IDiePool<SideType> { } @Override - public List<IDie<SideType>> contained() { + public List<Die<SideType>> contained() { return dice; } @@ -34,7 +34,7 @@ public class FixedDiePool<SideType> implements IDiePool<SideType> { @Override public String toString() { return dice.stream() - .map(IDie<SideType>::toString) + .map(Die<SideType>::toString) .collect(Collectors.joining(", ")); } diff --git a/dice/src/main/java/bjc/dicelang/neodice/diepool/TimesDiePool.java b/dice/src/main/java/bjc/dicelang/neodice/diepool/TimesDiePool.java index 56fe0e5..e039e47 100644 --- a/dice/src/main/java/bjc/dicelang/neodice/diepool/TimesDiePool.java +++ b/dice/src/main/java/bjc/dicelang/neodice/diepool/TimesDiePool.java @@ -5,11 +5,11 @@ import java.util.stream.*; import bjc.dicelang.neodice.*; -public class TimesDiePool<SideType> implements IDiePool<SideType> { - private final IDie<SideType> contained; +public class TimesDiePool<SideType> implements DiePool<SideType> { + private final Die<SideType> contained; private final int numDice; - public TimesDiePool(IDie<SideType> contained, int numDice) { + public TimesDiePool(Die<SideType> contained, int numDice) { this.contained = contained; this.numDice = numDice; } @@ -21,8 +21,8 @@ public class TimesDiePool<SideType> implements IDiePool<SideType> { } @Override - public List<IDie<SideType>> contained() { - List<IDie<SideType>> results = new ArrayList<>(numDice); + public List<Die<SideType>> contained() { + List<Die<SideType>> results = new ArrayList<>(numDice); for (int index = 0; index < numDice; index++) { results.add(contained); diff --git a/dice/src/main/java/bjc/dicelang/neodice/diepool/TransformDiePool.java b/dice/src/main/java/bjc/dicelang/neodice/diepool/TransformDiePool.java index f590e91..80b563f 100644 --- a/dice/src/main/java/bjc/dicelang/neodice/diepool/TransformDiePool.java +++ b/dice/src/main/java/bjc/dicelang/neodice/diepool/TransformDiePool.java @@ -6,12 +6,12 @@ import java.util.stream.*; import bjc.dicelang.neodice.*; -public class TransformDiePool<SideType> implements IDiePool<SideType> { - private final IDiePool<SideType> contained; +public class TransformDiePool<SideType> implements DiePool<SideType> { + private final DiePool<SideType> contained; private UnaryOperator<Stream<SideType>> transform; - public TransformDiePool(IDiePool<SideType> contained, + public TransformDiePool(DiePool<SideType> contained, UnaryOperator<Stream<SideType>> transform) { super(); this.contained = contained; @@ -24,7 +24,7 @@ public class TransformDiePool<SideType> implements IDiePool<SideType> { } @Override - public List<IDie<SideType>> contained() { + public List<Die<SideType>> contained() { return contained.contained(); } |
