com.threerings.parlor.card.data

## Class Hand

- java.lang.Object
- - java.util.AbstractCollection<E>
  - - java.util.AbstractList<E>
    - - java.util.ArrayList<E>
      - - com.threerings.util.StreamableArrayList<Card>
        - - com.threerings.parlor.card.data.Hand

All Implemented Interfaces:
  com.threerings.io.Streamable, Serializable, Cloneable, Iterable<Card>, Collection<Card>, List<Card>, RandomAccess

    public class Hand
    extends com.threerings.util.StreamableArrayList<Card>

Instances of this class represent hands of cards.

See Also:
  Serialized Form

### Nested Class Summary

### Nested classes/interfaces inherited from interface com.threerings.io.Streamable

`com.threerings.io.Streamable.Closure`

### Constructor Summary

Constructors
Constructor and Description
`Hand()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addAll(Card[] cards)` Adds all of the specified cards to this hand.
`boolean` `containsAll(Card[] cards)` Checks whether this hand contains all of the specified cards.
`Card[]` `getCards()` Converts this list of cards into an array.
`int` `getSuitMemberCount(int suit)` Counts the members of a particular suit within this hand.
`void` `removeAll(Card[] cards)` Removes all of the specified cards from this hand.

### Methods inherited from class com.threerings.util.StreamableArrayList

`newList, readObject, writeObject`

### Methods inherited from class java.util.ArrayList

`add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize`

### Methods inherited from class java.util.AbstractList

`equals, hashCode`

### Methods inherited from class java.util.AbstractCollection

`containsAll, toString`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface java.util.List

`containsAll, equals, hashCode`

### Methods inherited from interface java.util.Collection

`parallelStream, stream`

### Constructor Detail

#### Hand

    public Hand()

### Method Detail

#### addAll

    public void addAll(Card[] cards)

Adds all of the specified cards to this hand.

#### removeAll

    public void removeAll(Card[] cards)

Removes all of the specified cards from this hand.

#### containsAll

    public boolean containsAll(Card[] cards)

Checks whether this hand contains all of the specified cards.

#### getSuitMemberCount

    public int getSuitMemberCount(int suit)

Counts the members of a particular suit within this hand.

Parameters:
  `suit` - the suit of interest
Returns:
  the number of cards in the specified suit

#### getCards

    public Card[] getCards()

Converts this list of cards into an array. This only necessary if you need the cards in array form, use `ArrayList.get(int)` if you simply need to get a card from the hand.