public class Rack extends LinkedList<Tile> implements Cloneable
Rack
.
Name | Mode | Type | isHidden | isBound | isConstrained |
---|---|---|---|---|---|
empty | R | boolean | false | false | false |
first | R | E | false | false | false |
last | R | E | false | false | false |
modCount
Constructor and Description |
---|
Rack()
Sole constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(Tile tile) |
Rack |
clone() |
Stream<List<Tile>> |
combinations()
Method to get the
Stream of all possible combinations. |
List<Tile> |
draw(Bag bag)
|
boolean |
hasCapacity()
Method to determine if the
Rack has any remaining capacity
(should draw). |
Tile[] |
toArray() |
add, addAll, addAll, addFirst, addLast, clear, contains, descendingIterator, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, set, size, spliterator, toArray
iterator
equals, hashCode, listIterator, removeRange, subList
containsAll, isEmpty, removeAll, retainAll, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
containsAll, equals, hashCode, isEmpty, iterator, listIterator, removeAll, replaceAll, retainAll, sort, subList
parallelStream, removeIf, stream
public Rack()
public Rack clone()
clone
in class LinkedList<Tile>
public Stream<List<Tile>> combinations()
Stream
of all possible combinations.public boolean hasCapacity()
Rack
has any remaining capacity
(should draw).true
if the Rack
contains less than its
maximum capacity; false
otherwise.Copyright © 2015–2020. All rights reserved.