@Test public void cardsBySuitIsImmutable() { var ggCardsBySuit = this.ggDeck.getCardsBySuit(); Verify.assertThrows( UnsupportedOperationException.class, () -> ggCardsBySuit.removeAll(Suit.CLUBS)); Verify.assertThrows( UnsupportedOperationException.class, ggCardsBySuit::clear); Verify.assertThrows( UnsupportedOperationException.class, () -> ggCardsBySuit.get(Suit.CLUBS).remove(null)); Verify.assertThrows( UnsupportedOperationException.class, () -> ggCardsBySuit.get(Suit.CLUBS).add(null)); Verify.assertThrows( UnsupportedOperationException.class, ggCardsBySuit.get(Suit.CLUBS)::clear); }
public ImmutableSetMultimap<Suit, Card> getCardsBySuit() { return this.cardsBySuit; }
GoogleGuavaDeckOfCardsAsSortedSet { public ImmutableSetMultimap<Suit, Card> getCardsBySuit() { return this.cardsBySuit; } }
GoogleGuavaDeckOfCardsAsSortedSet { public ImmutableSetMultimap<Suit, Card> getCardsBySuit() { return this.cardsBySuit; } GoogleGuavaDeckOfCardsAsSortedSet(); }
GoogleGuavaDeckOfCardsAsSortedSet { public ImmutableSetMultimap<Suit, Card> getCardsBySuit() { return this.cardsBySuit; } GoogleGuavaDeckOfCardsAsSortedSet(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<Card> deque, int count); ImmutableList<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand); ImmutableList<Set<Card>> dealHands(
            Deque<Card> shuffled,
            int hands,
            int cardsPerHand); Set<Card> diamonds(); Set<Card> hearts(); Set<Card> spades(); Set<Card> clubs(); Multiset<Suit> countsBySuit(); Multiset<Rank> countsByRank(); ImmutableSortedSet<Card> getCards(); ImmutableSetMultimap<Suit, Card> getCardsBySuit(); }
GoogleGuavaDeckOfCardsAsSortedSet { public ImmutableSetMultimap<Suit, Card> getCardsBySuit() { return this.cardsBySuit; } GoogleGuavaDeckOfCardsAsSortedSet(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<Card> deque, int count); ImmutableList<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand); ImmutableList<Set<Card>> dealHands(
            Deque<Card> shuffled,
            int hands,
            int cardsPerHand); Set<Card> diamonds(); Set<Card> hearts(); Set<Card> spades(); Set<Card> clubs(); Multiset<Suit> countsBySuit(); Multiset<Rank> countsByRank(); ImmutableSortedSet<Card> getCards(); ImmutableSetMultimap<Suit, Card> getCardsBySuit();  }