Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Jeff Higgins Newsgroups: comp.lang.java.programmer Subject: Re: Help with Deck of cards assignment and getting it to deal... Date: Sun, 03 Aug 2014 13:47:50 -0400 Organization: A noiseless patient Spider Lines: 34 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sun, 3 Aug 2014 17:47:53 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="b896cb427f8c4d19d14880347aa9d6ce"; logging-data="11952"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/LIY5rHjEMnYu3SXXK4xCUF24YpQ+4P7Y=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.6.0 In-Reply-To: Cancel-Lock: sha1:pS40f63HURG9j/vF4AFpzeby868= Xref: csiph.com comp.lang.java.programmer:29523 On 08/03/2014 01:25 PM, Jeff Higgins wrote: > package scratch; > > /** > * A playing card. > * > * @author jeff > * > */ > public interface Card extends Comparable { > > /** > * Returns one of the 13 distinct values represented > * in the implementation of the {@link Rank} interface. > * > * @return the Rank of this Card. > */ > Rank getRank(); > > /** > * Returns one of the distinct values represented > * in the implementation of the {@link Suit} interface. > * > * @return the Suit of this Card. > */ > Suit getSuit(); > > } > Hint: java.lang.Comparator Hint II: java+comparable+vs+comparator How to implement the Comparable interface using a Comparator?