public static <T extends RingPosition<T>> boolean isInBounds(T token, Iterable<Bounds<T>> bounds) { assert bounds != null; for (Bounds<T> bound : bounds) { if (bound.contains(token)) { return true; } } return false; }
public static <T extends RingPosition<T>> boolean isInBounds(T token, Iterable<Bounds<T>> bounds) { assert bounds != null; for (Bounds<T> bound : bounds) { if (bound.contains(token)) { return true; } } return false; }
public static <T extends RingPosition<T>> boolean isInBounds(T token, Iterable<Bounds<T>> bounds) { assert bounds != null; for (Bounds<T> bound : bounds) { if (bound.contains(token)) { return true; } } return false; }
public static <T extends RingPosition<T>> boolean isInBounds(T token, Iterable<Bounds<T>> bounds) { assert bounds != null; for (Bounds<T> bound : bounds) { if (bound.contains(token)) { return true; } } return false; }
public static <T extends RingPosition<T>> boolean isInBounds(T token, Iterable<Bounds<T>> bounds) { assert bounds != null; for (Bounds<T> bound : bounds) { if (bound.contains(token)) { return true; } } return false; }
public Pair<AbstractBounds<T>, AbstractBounds<T>> split(T position) { assert contains(position); // Check if the split would have no effect on the range if (position.equals(right)) return null; AbstractBounds<T> lb = new Bounds<T>(left, position); AbstractBounds<T> rb = new Range<T>(position, right); return Pair.create(lb, rb); }
public Pair<AbstractBounds<T>, AbstractBounds<T>> split(T position) { assert contains(position); // Check if the split would have no effect on the range if (position.equals(right)) return null; AbstractBounds<T> lb = new Bounds<T>(left, position); AbstractBounds<T> rb = new Range<T>(position, right); return Pair.create(lb, rb); }
public Pair<AbstractBounds<T>, AbstractBounds<T>> split(T position) { assert contains(position); // Check if the split would have no effect on the range if (position.equals(right)) return null; AbstractBounds<T> lb = new Bounds<T>(left, position); AbstractBounds<T> rb = new Range<T>(position, right); return Pair.create(lb, rb); }
public Pair<AbstractBounds<T>, AbstractBounds<T>> split(T position) { assert contains(position); // Check if the split would have no effect on the range if (position.equals(right)) return null; AbstractBounds<T> lb = new Bounds<T>(left, position, partitioner); AbstractBounds<T> rb = new Range<T>(position, right, partitioner); return Pair.create(lb, rb); }
public Pair<AbstractBounds<T>, AbstractBounds<T>> split(T position) { assert contains(position); // Check if the split would have no effect on the range if (position.equals(right)) return null; AbstractBounds<T> lb = new Bounds<T>(left, position); AbstractBounds<T> rb = new Range<T>(position, right); return Pair.create(lb, rb); }