method2testcases stringlengths 118 6.63k |
|---|
### Question:
GoogleGuavaDeckOfCardsAsSortedSet { public Multiset<Rank> countsByRank() { return null; } GoogleGuavaDeckOfCardsAsSortedSet(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<Card> deque, int count); ImmutableList<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand); ImmutableLis... |
### Question:
EclipseCollectionsDeckOfCardsAsSortedSet { public ImmutableSortedSet<Card> getCards() { return this.cards; } EclipseCollectionsDeckOfCardsAsSortedSet(); MutableStack<Card> shuffle(Random random); MutableSet<Card> deal(MutableStack<Card> stack, int count); ImmutableList<Set<Card>> shuffleAndDeal(Random ran... |
### Question:
EclipseCollectionsDeckOfCardsAsSortedSet { public ImmutableSortedSet<Card> diamonds() { return null; } EclipseCollectionsDeckOfCardsAsSortedSet(); MutableStack<Card> shuffle(Random random); MutableSet<Card> deal(MutableStack<Card> stack, int count); ImmutableList<Set<Card>> shuffleAndDeal(Random random, i... |
### Question:
EclipseCollectionsDeckOfCardsAsSortedSet { public ImmutableSortedSet<Card> hearts() { return null; } EclipseCollectionsDeckOfCardsAsSortedSet(); MutableStack<Card> shuffle(Random random); MutableSet<Card> deal(MutableStack<Card> stack, int count); ImmutableList<Set<Card>> shuffleAndDeal(Random random, int... |
### Question:
EclipseCollectionsDeckOfCardsAsSortedSet { public ImmutableSortedSet<Card> spades() { return null; } EclipseCollectionsDeckOfCardsAsSortedSet(); MutableStack<Card> shuffle(Random random); MutableSet<Card> deal(MutableStack<Card> stack, int count); ImmutableList<Set<Card>> shuffleAndDeal(Random random, int... |
### Question:
EclipseCollectionsDeckOfCardsAsSortedSet { public ImmutableSortedSet<Card> clubs() { return null; } EclipseCollectionsDeckOfCardsAsSortedSet(); MutableStack<Card> shuffle(Random random); MutableSet<Card> deal(MutableStack<Card> stack, int count); ImmutableList<Set<Card>> shuffleAndDeal(Random random, int ... |
### Question:
JDK8DeckOfCardsAsList { public List<Card> clubs() { return null; } JDK8DeckOfCardsAsList(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<Card> deque, int count); List<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand); List<Set<Card>> dealHands(Deque<Card> shuffled, int hand... |
### Question:
EclipseCollectionsDeckOfCardsAsSortedSet { public MutableSet<Card> deal(MutableStack<Card> stack, int count) { return stack.pop(count).toSet(); } EclipseCollectionsDeckOfCardsAsSortedSet(); MutableStack<Card> shuffle(Random random); MutableSet<Card> deal(MutableStack<Card> stack, int count); ImmutableList... |
### Question:
EclipseCollectionsDeckOfCardsAsSortedSet { public ImmutableList<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand) { MutableStack<Card> shuffled = this.shuffle(random); return this.dealHands(shuffled, hands, cardsPerHand); } EclipseCollectionsDeckOfCardsAsSortedSet(); MutableStack<Card>... |
### Question:
EclipseCollectionsDeckOfCardsAsSortedSet { public ImmutableList<Set<Card>> dealHands( MutableStack<Card> shuffled, int hands, int cardsPerHand) { return null; } EclipseCollectionsDeckOfCardsAsSortedSet(); MutableStack<Card> shuffle(Random random); MutableSet<Card> deal(MutableStack<Card> stack, int count)... |
### Question:
EclipseCollectionsDeckOfCardsAsSortedSet { public ImmutableSortedSetMultimap<Suit, Card> getCardsBySuit() { return this.cardsBySuit; } EclipseCollectionsDeckOfCardsAsSortedSet(); MutableStack<Card> shuffle(Random random); MutableSet<Card> deal(MutableStack<Card> stack, int count); ImmutableList<Set<Card>>... |
### Question:
EclipseCollectionsDeckOfCardsAsSortedSet { public Bag<Suit> countsBySuit() { return null; } EclipseCollectionsDeckOfCardsAsSortedSet(); MutableStack<Card> shuffle(Random random); MutableSet<Card> deal(MutableStack<Card> stack, int count); ImmutableList<Set<Card>> shuffleAndDeal(Random random, int hands, i... |
### Question:
EclipseCollectionsDeckOfCardsAsSortedSet { public Bag<Rank> countsByRank() { return null; } EclipseCollectionsDeckOfCardsAsSortedSet(); MutableStack<Card> shuffle(Random random); MutableSet<Card> deal(MutableStack<Card> stack, int count); ImmutableList<Set<Card>> shuffleAndDeal(Random random, int hands, i... |
### Question:
JDKImperativeDeckOfCardsAsSortedSet { public SortedSet<Card> getCards() { return this.cards; } JDKImperativeDeckOfCardsAsSortedSet(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<Card> deque, int count); List<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand); List<Set<Card>... |
### Question:
JDKImperativeDeckOfCardsAsSortedSet { public SortedSet<Card> diamonds() { return this.cardsBySuit.get(Suit.DIAMONDS); } JDKImperativeDeckOfCardsAsSortedSet(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<Card> deque, int count); List<Set<Card>> shuffleAndDeal(Random random, int hands, int card... |
### Question:
JDK8DeckOfCardsAsList { public Set<Card> deal(Deque<Card> deque, int count) { var hand = new HashSet<Card>(); IntStream.range(0, count).forEach(i -> hand.add(deque.pop())); return hand; } JDK8DeckOfCardsAsList(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<Card> deque, int count); List<Set<Ca... |
### Question:
JDKImperativeDeckOfCardsAsSortedSet { public SortedSet<Card> hearts() { return this.cardsBySuit.get(Suit.HEARTS); } JDKImperativeDeckOfCardsAsSortedSet(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<Card> deque, int count); List<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPer... |
### Question:
JDKImperativeDeckOfCardsAsSortedSet { public SortedSet<Card> spades() { return this.cardsBySuit.get(Suit.SPADES); } JDKImperativeDeckOfCardsAsSortedSet(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<Card> deque, int count); List<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPer... |
### Question:
JDKImperativeDeckOfCardsAsSortedSet { public SortedSet<Card> clubs() { return this.cardsBySuit.get(Suit.CLUBS); } JDKImperativeDeckOfCardsAsSortedSet(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<Card> deque, int count); List<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHa... |
### Question:
JDKImperativeDeckOfCardsAsSortedSet { public Set<Card> deal(Deque<Card> deque, int count) { Set<Card> hand = new HashSet<>(); for (int i = 0; i < count; i++) { hand.add(deque.pop()); } return hand; } JDKImperativeDeckOfCardsAsSortedSet(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<Card> dequ... |
### Question:
JDKImperativeDeckOfCardsAsSortedSet { public List<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand) { Deque<Card> shuffled = this.shuffle(random); return this.dealHands(shuffled, hands, cardsPerHand); } JDKImperativeDeckOfCardsAsSortedSet(); Deque<Card> shuffle(Random random); Set<Card... |
### Question:
JDKImperativeDeckOfCardsAsSortedSet { public List<Set<Card>> dealHands(Deque<Card> shuffled, int hands, int cardsPerHand) { List<Set<Card>> result = new ArrayList<>(); for (int i = 0; i < hands; i++) { result.add(this.deal(shuffled, cardsPerHand)); } return Collections.unmodifiableList(result); } JDKImper... |
### Question:
JDKImperativeDeckOfCardsAsSortedSet { public Map<Suit, SortedSet<Card>> getCardsBySuit() { return this.cardsBySuit; } JDKImperativeDeckOfCardsAsSortedSet(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<Card> deque, int count); List<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsP... |
### Question:
JDKImperativeDeckOfCardsAsSortedSet { public Map<Suit, Long> countsBySuit() { Map<Suit, Long> result = new HashMap<>(); for (Card card : this.cards) { Suit suit = card.suit(); Long value = result.get(suit); if (value == null) { value = Long.valueOf(0); } result.put(suit, value + 1); } return result; } JDK... |
### Question:
JDKImperativeDeckOfCardsAsSortedSet { public Map<Rank, Long> countsByRank() { Map<Rank, Long> result = new HashMap<>(); for (Card card : this.cards) { Rank rank = card.rank(); Long value = result.get(rank); if (value == null) { value = Long.valueOf(0); } result.put(rank, value + 1); } return result; } JDK... |
### Question:
JDK8DeckOfCardsAsList { public List<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand) { var shuffled = this.shuffle(random); return this.dealHands(shuffled, hands, cardsPerHand); } JDK8DeckOfCardsAsList(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<Card> deque, int count)... |
### Question:
DonutShop { public MutableList<ObjectIntPair<DonutType>> getTopDonuts(int n) { return this.deliveries .flatCollect(Delivery::donuts) .countBy(Donut::type) .topOccurrences(n); } void makeDonuts(DonutType type, int count); Delivery deliverOrder(String customerName, LocalDate date, String donutTypeCounts); ... |
### Question:
DonutShop { public double getTotalDeliveryValueFor(LocalDate date) { return this.deliveries .selectWith(Delivery::deliveredOn, date) .sumOfDouble(Delivery::getTotalPrice); } void makeDonuts(DonutType type, int count); Delivery deliverOrder(String customerName, LocalDate date, String donutTypeCounts); Bag... |
### Question:
DonutShop { public Customer getTopCustomer() { return this.customers.maxBy(Customer::getTotalDonutsOrdered); } void makeDonuts(DonutType type, int count); Delivery deliverOrder(String customerName, LocalDate date, String donutTypeCounts); Bag<DonutType> getDonuts(); MutableList<ObjectIntPair<DonutType>> ... |
### Question:
DonutShop { public Multimap<DonutType, Customer> getCustomersByDonutTypesOrdered() { return this.customers.groupByEach(Customer::getDonutTypesOrdered); } void makeDonuts(DonutType type, int count); Delivery deliverOrder(String customerName, LocalDate date, String donutTypeCounts); Bag<DonutType> getDonut... |
### Question:
DonutShop { public DoubleSummaryStatistics getDonutPriceStatistics(LocalDate fromDate, LocalDate toDate) { return this.deliveries .select(each -> (each.deliveredOn(fromDate) || each.getDate().isAfter(fromDate))) .select(each -> (each.deliveredOn(toDate) || each.getDate().isBefore(toDate))) .flatCollect(De... |
### Question:
DonutShop { public MutableList<ObjectIntPair<DonutType>> getTopDonuts(int n) { return null; } void makeDonuts(DonutType type, int count); Delivery deliverOrder(String customerName, LocalDate date, String donutTypeCounts); Bag<DonutType> getDonuts(); MutableList<ObjectIntPair<DonutType>> getTopDonuts(int ... |
### Question:
DonutShop { public double getTotalDeliveryValueFor(LocalDate date) { return 0.0d; } void makeDonuts(DonutType type, int count); Delivery deliverOrder(String customerName, LocalDate date, String donutTypeCounts); Bag<DonutType> getDonuts(); MutableList<ObjectIntPair<DonutType>> getTopDonuts(int n); double... |
### Question:
DonutShop { public Customer getTopCustomer() { return null; } void makeDonuts(DonutType type, int count); Delivery deliverOrder(String customerName, LocalDate date, String donutTypeCounts); Bag<DonutType> getDonuts(); MutableList<ObjectIntPair<DonutType>> getTopDonuts(int n); double getTotalDeliveryValue... |
### Question:
DonutShop { public Multimap<DonutType, Customer> getCustomersByDonutTypesOrdered() { return null; } void makeDonuts(DonutType type, int count); Delivery deliverOrder(String customerName, LocalDate date, String donutTypeCounts); Bag<DonutType> getDonuts(); MutableList<ObjectIntPair<DonutType>> getTopDonut... |
### Question:
DonutShop { public DoubleSummaryStatistics getDonutPriceStatistics(LocalDate fromDate, LocalDate toDate) { return null; } void makeDonuts(DonutType type, int count); Delivery deliverOrder(String customerName, LocalDate date, String donutTypeCounts); Bag<DonutType> getDonuts(); MutableList<ObjectIntPair<D... |
### Question:
JDK8DeckOfCardsAsList { public List<Set<Card>> dealHands(Deque<Card> shuffled, int hands, int cardsPerHand) { return null; } JDK8DeckOfCardsAsList(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<Card> deque, int count); List<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand)... |
### Question:
MyCalendar { public boolean hasOverlappingMeeting(LocalDate date, LocalTime startTime, Duration duration) { return false; } MyCalendar(TimeZone timezone); ZoneId getZoneId(); FullMonth getMeetingsForYearMonth(int year, Month month); SortedSetIterable<Meeting> getMeetingsForDate(LocalDate date); WorkWeek g... |
### Question:
MyCalendar { public SortedSetIterable<Meeting> getMeetingsForDate(LocalDate date) { SortedSetIterable<Meeting> set = this.meetings.get(date); return set; } MyCalendar(TimeZone timezone); ZoneId getZoneId(); FullMonth getMeetingsForYearMonth(int year, Month month); SortedSetIterable<Meeting> getMeetingsFor... |
### Question:
MyCalendar { public WorkWeek getMeetingsForWorkWeekOf(LocalDate value) { return new WorkWeek(value, this.meetings); } MyCalendar(TimeZone timezone); ZoneId getZoneId(); FullMonth getMeetingsForYearMonth(int year, Month month); SortedSetIterable<Meeting> getMeetingsForDate(LocalDate date); WorkWeek getMeet... |
### Question:
MyCalendar { public FullWeek getMeetingsForFullWeekOf(LocalDate value) { return new FullWeek(value, this.meetings); } MyCalendar(TimeZone timezone); ZoneId getZoneId(); FullMonth getMeetingsForYearMonth(int year, Month month); SortedSetIterable<Meeting> getMeetingsForDate(LocalDate date); WorkWeek getMeet... |
### Question:
MyCalendar { public FullMonth getMeetingsForYearMonth(int year, Month month) { return new FullMonth(LocalDate.of(year, month, 1), this.meetings); } MyCalendar(TimeZone timezone); ZoneId getZoneId(); FullMonth getMeetingsForYearMonth(int year, Month month); SortedSetIterable<Meeting> getMeetingsForDate(Loc... |
### Question:
MyCalendar { public MutableList<Interval> getAvailableTimeslots(LocalDate date) { return Lists.mutable.empty(); } MyCalendar(TimeZone timezone); ZoneId getZoneId(); FullMonth getMeetingsForYearMonth(int year, Month month); SortedSetIterable<Meeting> getMeetingsForDate(LocalDate date); WorkWeek getMeetings... |
### Question:
JDK8DeckOfCardsAsList { public Map<Suit, List<Card>> getCardsBySuit() { return this.cardsBySuit; } JDK8DeckOfCardsAsList(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<Card> deque, int count); List<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand); List<Set<Card>> dealHand... |
### Question:
JDK8DeckOfCardsAsList { public Map<Suit, Long> countsBySuit() { return null; } JDK8DeckOfCardsAsList(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<Card> deque, int count); List<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand); List<Set<Card>> dealHands(Deque<Card> shuffl... |
### Question:
JDK8DeckOfCardsAsList { public Map<Rank, Long> countsByRank() { return null; } JDK8DeckOfCardsAsList(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<Card> deque, int count); List<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand); List<Set<Card>> dealHands(Deque<Card> shuffl... |
### Question:
ApacheCommonsDeckOfCardsAsList { public List<Card> getCards() { return this.cards; } ApacheCommonsDeckOfCardsAsList(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<Card> deque, int count); List<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand); List<Set<Card>> dealHands(Deq... |
### Question:
ApacheCommonsDeckOfCardsAsList { public List<Card> diamonds() { return null; } ApacheCommonsDeckOfCardsAsList(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<Card> deque, int count); List<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand); List<Set<Card>> dealHands(Deque<Car... |
### Question:
ApacheCommonsDeckOfCardsAsList { public List<Card> hearts() { return null; } ApacheCommonsDeckOfCardsAsList(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<Card> deque, int count); List<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand); List<Set<Card>> dealHands(Deque<Card>... |
### Question:
EclipseCollectionsDeckOfCardsAsList { public ImmutableList<Card> diamonds() { return null; } EclipseCollectionsDeckOfCardsAsList(); MutableStack<Card> shuffle(Random random); MutableSet<Card> deal(MutableStack<Card> stack, int count); ImmutableList<Set<Card>> shuffleAndDeal(Random random, int hands, int c... |
### Question:
ApacheCommonsDeckOfCardsAsList { public List<Card> spades() { return null; } ApacheCommonsDeckOfCardsAsList(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<Card> deque, int count); List<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand); List<Set<Card>> dealHands(Deque<Card>... |
### Question:
ApacheCommonsDeckOfCardsAsList { public List<Card> clubs() { return null; } ApacheCommonsDeckOfCardsAsList(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<Card> deque, int count); List<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand); List<Set<Card>> dealHands(Deque<Card> ... |
### Question:
ApacheCommonsDeckOfCardsAsList { public Set<Card> deal(Deque<Card> deque, int count) { var hand = new HashSet<Card>(); IntStream.range(0, count).forEach(i -> hand.add(deque.pop())); return hand; } ApacheCommonsDeckOfCardsAsList(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<Card> deque, int c... |
### Question:
ApacheCommonsDeckOfCardsAsList { public List<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand) { var shuffled = this.shuffle(random); return this.dealHands(shuffled, hands, cardsPerHand); } ApacheCommonsDeckOfCardsAsList(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<Card>... |
### Question:
ApacheCommonsDeckOfCardsAsList { public List<Set<Card>> dealHands(Deque<Card> shuffled, int hands, int cardsPerHand) { return null; } ApacheCommonsDeckOfCardsAsList(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<Card> deque, int count); List<Set<Card>> shuffleAndDeal(Random random, int hands,... |
### Question:
ApacheCommonsDeckOfCardsAsList { public MultiValuedMap<Suit, Card> getCardsBySuit() { return this.cardsBySuit; } ApacheCommonsDeckOfCardsAsList(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<Card> deque, int count); List<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand); L... |
### Question:
ApacheCommonsDeckOfCardsAsList { public Bag<Suit> countsBySuit() { return null; } ApacheCommonsDeckOfCardsAsList(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<Card> deque, int count); List<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand); List<Set<Card>> dealHands(Deque<... |
### Question:
ApacheCommonsDeckOfCardsAsList { public MultiSet<Rank> countsByRank() { return null; } ApacheCommonsDeckOfCardsAsList(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<Card> deque, int count); List<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand); List<Set<Card>> dealHands(D... |
### Question:
GoogleGuavaDeckOfCardsAsList { public ImmutableList<Card> getCards() { return this.cards; } GoogleGuavaDeckOfCardsAsList(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<Card> deque, int count); ImmutableList<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand); ImmutableList<S... |
### Question:
EclipseCollectionsDeckOfCardsAsList { public ImmutableList<Card> hearts() { return null; } EclipseCollectionsDeckOfCardsAsList(); MutableStack<Card> shuffle(Random random); MutableSet<Card> deal(MutableStack<Card> stack, int count); ImmutableList<Set<Card>> shuffleAndDeal(Random random, int hands, int car... |
### Question:
GoogleGuavaDeckOfCardsAsList { public ImmutableList<Card> diamonds() { return null; } GoogleGuavaDeckOfCardsAsList(); 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<Car... |
### Question:
GoogleGuavaDeckOfCardsAsList { public ImmutableList<Card> hearts() { return null; } GoogleGuavaDeckOfCardsAsList(); 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>... |
### Question:
GoogleGuavaDeckOfCardsAsList { public ImmutableList<Card> spades() { return null; } GoogleGuavaDeckOfCardsAsList(); 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>... |
### Question:
GoogleGuavaDeckOfCardsAsList { public ImmutableList<Card> clubs() { return null; } GoogleGuavaDeckOfCardsAsList(); 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>>... |
### Question:
GoogleGuavaDeckOfCardsAsList { public Set<Card> deal(Deque<Card> deque, int count) { var hand = new HashSet<Card>(); IntStream.range(0, count).forEach(i -> hand.add(deque.pop())); return hand; } GoogleGuavaDeckOfCardsAsList(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<Card> deque, int count... |
### Question:
GoogleGuavaDeckOfCardsAsList { public ImmutableList<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand) { var shuffled = this.shuffle(random); return this.dealHands(shuffled, hands, cardsPerHand); } GoogleGuavaDeckOfCardsAsList(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<... |
### Question:
GoogleGuavaDeckOfCardsAsList { public ImmutableList<Set<Card>> dealHands(Deque<Card> shuffled, int hands, int cardsPerHand) { return null; } GoogleGuavaDeckOfCardsAsList(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<Card> deque, int count); ImmutableList<Set<Card>> shuffleAndDeal(Random rand... |
### Question:
GoogleGuavaDeckOfCardsAsList { public ImmutableListMultimap<Suit, Card> getCardsBySuit() { return this.cardsBySuit; } GoogleGuavaDeckOfCardsAsList(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<Card> deque, int count); ImmutableList<Set<Card>> shuffleAndDeal(Random random, int hands, int card... |
### Question:
EclipseCollectionsDeckOfCardsAsList { public ImmutableList<Card> spades() { return null; } EclipseCollectionsDeckOfCardsAsList(); MutableStack<Card> shuffle(Random random); MutableSet<Card> deal(MutableStack<Card> stack, int count); ImmutableList<Set<Card>> shuffleAndDeal(Random random, int hands, int car... |
### Question:
GoogleGuavaDeckOfCardsAsList { public Multiset<Suit> countsBySuit() { return null; } GoogleGuavaDeckOfCardsAsList(); 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... |
### Question:
GoogleGuavaDeckOfCardsAsList { public Multiset<Rank> countsByRank() { return null; } GoogleGuavaDeckOfCardsAsList(); 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... |
### Question:
JDKImperativeDeckOfCardsAsList { public List<Card> getCards() { return this.cards; } JDKImperativeDeckOfCardsAsList(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<Card> deque, int count); List<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand); List<Set<Card>> dealHands(Deq... |
### Question:
JDKImperativeDeckOfCardsAsList { public List<Card> diamonds() { return this.cardsBySuit.get(Suit.DIAMONDS); } JDKImperativeDeckOfCardsAsList(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<Card> deque, int count); List<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand); List... |
### Question:
JDKImperativeDeckOfCardsAsList { public List<Card> hearts() { return this.cardsBySuit.get(Suit.HEARTS); } JDKImperativeDeckOfCardsAsList(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<Card> deque, int count); List<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand); List<Set... |
### Question:
JDKImperativeDeckOfCardsAsList { public List<Card> spades() { return this.cardsBySuit.get(Suit.SPADES); } JDKImperativeDeckOfCardsAsList(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<Card> deque, int count); List<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand); List<Set... |
### Question:
JDKImperativeDeckOfCardsAsList { public List<Card> clubs() { return this.cardsBySuit.get(Suit.CLUBS); } JDKImperativeDeckOfCardsAsList(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<Card> deque, int count); List<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand); List<Set<C... |
### Question:
JDKImperativeDeckOfCardsAsList { public Set<Card> deal(Deque<Card> deque, int count) { var hand = new HashSet<Card>(); for (int i = 0; i < count; i++) { hand.add(deque.pop()); } return hand; } JDKImperativeDeckOfCardsAsList(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<Card> deque, int count... |
### Question:
JDKImperativeDeckOfCardsAsList { public List<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand) { var shuffled = this.shuffle(random); return this.dealHands(shuffled, hands, cardsPerHand); } JDKImperativeDeckOfCardsAsList(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<Card>... |
### Question:
EclipseCollectionsDeckOfCardsAsList { public ImmutableList<Card> clubs() { return null; } EclipseCollectionsDeckOfCardsAsList(); MutableStack<Card> shuffle(Random random); MutableSet<Card> deal(MutableStack<Card> stack, int count); ImmutableList<Set<Card>> shuffleAndDeal(Random random, int hands, int card... |
### Question:
JDKImperativeDeckOfCardsAsList { public List<Set<Card>> dealHands(Deque<Card> shuffled, int hands, int cardsPerHand) { var result = new ArrayList<Set<Card>>(); for (int i = 0; i < hands; i++) { result.add(this.deal(shuffled, cardsPerHand)); } return List.copyOf(result); } JDKImperativeDeckOfCardsAsList();... |
### Question:
JDKImperativeDeckOfCardsAsList { public Map<Suit, List<Card>> getCardsBySuit() { return this.cardsBySuit; } JDKImperativeDeckOfCardsAsList(); Deque<Card> shuffle(Random random); Set<Card> deal(Deque<Card> deque, int count); List<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand); List<S... |
### Question:
JDKImperativeDeckOfCardsAsList { public Map<Suit, Long> countsBySuit() { var result = new HashMap<Suit, Long>(); for (var card : this.cards) { var suit = card.suit(); var value = result.computeIfAbsent(suit, s -> Long.valueOf(0)); result.put(suit, value + 1); } return result; } JDKImperativeDeckOfCardsAsL... |
### Question:
JDKImperativeDeckOfCardsAsList { public Map<Rank, Long> countsByRank() { var result = new HashMap<Rank, Long>(); for (var card : this.cards) { var rank = card.rank(); var value = result.computeIfAbsent(rank, r -> Long.valueOf(0)); result.put(rank, value + 1); } return result; } JDKImperativeDeckOfCardsAsL... |
### Question:
VavrDeckOfCardsAsList { public List<Card> getCards() { return this.cards; } VavrDeckOfCardsAsList(); List<Card> shuffle(Random random); Tuple2<Set<Card>, ? extends List<Card>> deal(List<Card> stack, int count); List<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand); List<Set<Card>> dea... |
### Question:
VavrDeckOfCardsAsList { public List<Card> diamonds() { return null; } VavrDeckOfCardsAsList(); List<Card> shuffle(Random random); Tuple2<Set<Card>, ? extends List<Card>> deal(List<Card> stack, int count); List<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand); List<Set<Card>> dealHands... |
### Question:
VavrDeckOfCardsAsList { public List<Card> hearts() { return null; } VavrDeckOfCardsAsList(); List<Card> shuffle(Random random); Tuple2<Set<Card>, ? extends List<Card>> deal(List<Card> stack, int count); List<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand); List<Set<Card>> dealHands(
... |
### Question:
VavrDeckOfCardsAsList { public List<Card> spades() { return null; } VavrDeckOfCardsAsList(); List<Card> shuffle(Random random); Tuple2<Set<Card>, ? extends List<Card>> deal(List<Card> stack, int count); List<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand); List<Set<Card>> dealHands(
... |
### Question:
VavrDeckOfCardsAsList { public List<Card> clubs() { return null; } VavrDeckOfCardsAsList(); List<Card> shuffle(Random random); Tuple2<Set<Card>, ? extends List<Card>> deal(List<Card> stack, int count); List<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand); List<Set<Card>> dealHands(
... |
### Question:
EclipseCollectionsDeckOfCardsAsList { public MutableSet<Card> deal(MutableStack<Card> stack, int count) { return stack.pop(count).toSet(); } EclipseCollectionsDeckOfCardsAsList(); MutableStack<Card> shuffle(Random random); MutableSet<Card> deal(MutableStack<Card> stack, int count); ImmutableList<Set<Card>... |
### Question:
VavrDeckOfCardsAsList { public Tuple2<Set<Card>, ? extends List<Card>> deal(List<Card> stack, int count) { var hand = HashSet.<Card>empty(); for (int i = 0; i < count; i++) { var cardTuple2 = stack.pop2(); stack = cardTuple2._2(); hand = hand.add(cardTuple2._1()); } return Tuple.of(hand, stack); } VavrDec... |
### Question:
VavrDeckOfCardsAsList { public List<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand) { var shuffled = this.shuffle(random); return this.dealHands(shuffled, hands, cardsPerHand); } VavrDeckOfCardsAsList(); List<Card> shuffle(Random random); Tuple2<Set<Card>, ? extends List<Card>> deal(... |
### Question:
VavrDeckOfCardsAsList { public List<Set<Card>> dealHands( List<Card> shuffled, int hands, int cardsPerHand) { return null; } VavrDeckOfCardsAsList(); List<Card> shuffle(Random random); Tuple2<Set<Card>, ? extends List<Card>> deal(List<Card> stack, int count); List<Set<Card>> shuffleAndDeal(Random random, ... |
### Question:
VavrDeckOfCardsAsList { public Map<Suit, ? extends List<Card>> getCardsBySuit() { return this.cardsBySuit; } VavrDeckOfCardsAsList(); List<Card> shuffle(Random random); Tuple2<Set<Card>, ? extends List<Card>> deal(List<Card> stack, int count); List<Set<Card>> shuffleAndDeal(Random random, int hands, int c... |
### Question:
VavrDeckOfCardsAsList { public Map<Suit, Long> countsBySuit() { return null; } VavrDeckOfCardsAsList(); List<Card> shuffle(Random random); Tuple2<Set<Card>, ? extends List<Card>> deal(List<Card> stack, int count); List<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand); List<Set<Card>> ... |
### Question:
VavrDeckOfCardsAsList { public Map<Rank, Long> countsByRank() { return null; } VavrDeckOfCardsAsList(); List<Card> shuffle(Random random); Tuple2<Set<Card>, ? extends List<Card>> deal(List<Card> stack, int count); List<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand); List<Set<Card>> ... |
### Question:
EclipseCollectionsDeckOfCardsAsList { public ImmutableList<Set<Card>> shuffleAndDeal(Random random, int hands, int cardsPerHand) { var shuffled = this.shuffle(random); return this.dealHands(shuffled, hands, cardsPerHand); } EclipseCollectionsDeckOfCardsAsList(); MutableStack<Card> shuffle(Random random); ... |
### Question:
HashSetMultimap extends AbstractMutableMultimap<K, V, MutableSet<V>> implements MutableSetMultimap<K, V> { public static <K, V> HashSetMultimap<K, V> newMultimap() { return new HashSetMultimap<>(); } static HashSetMultimap<K, V> newMultimap(); @Override int size(); }### Answer:
@Test public void hashCod... |
### Question:
CustomCollectionsDeckOfCardsAsList { public MutableList<Card> getCards() { return this.cards; } CustomCollectionsDeckOfCardsAsList(); Deque<Card> shuffle(Random random); MutableSet<Card> deal(Deque<Card> deque, int count); MutableList<MutableSet<Card>> shuffleAndDeal(Random random, int hands, int cardsPer... |
### Question:
CustomCollectionsDeckOfCardsAsList { public MutableList<Card> diamonds() { return this.cardsBySuit.get(Suit.DIAMONDS); } CustomCollectionsDeckOfCardsAsList(); Deque<Card> shuffle(Random random); MutableSet<Card> deal(Deque<Card> deque, int count); MutableList<MutableSet<Card>> shuffleAndDeal(Random random... |
### Question:
CustomCollectionsDeckOfCardsAsList { public MutableList<Card> hearts() { return this.cardsBySuit.get(Suit.HEARTS); } CustomCollectionsDeckOfCardsAsList(); Deque<Card> shuffle(Random random); MutableSet<Card> deal(Deque<Card> deque, int count); MutableList<MutableSet<Card>> shuffleAndDeal(Random random, in... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.