public class Card extends Object implements Comparable<Card>
Card.
| Name | Mode | Type | isHidden | isBound | isConstrained |
|---|---|---|---|---|---|
| color | R | Card.Color | false | false | false |
| rank | R | Card.Rank | false | false | false |
| suit | R | Card.Suit | false | false | false |
| Modifier and Type | Class and Description |
|---|---|
static class |
Card.Color
|
static class |
Card.Rank
|
static class |
Card.Suit
|
| Modifier | Constructor and Description |
|---|---|
protected |
Card(Card.Suit suit,
Card.Rank rank)
Sole protected constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Card that) |
boolean |
equals(Object object) |
Card.Color |
getColor()
Method to get the
Card Card.Color. |
Card.Rank |
getRank()
|
Card.Suit |
getSuit()
|
int |
hashCode() |
static Card |
parse(String string)
|
String |
toString() |
public Card.Color getColor()
Card Card.Color.Card.Suit.getColor()public int compareTo(Card that)
compareTo in interface Comparable<Card>Copyright © 2015–2020 Allen D. Ball. All rights reserved.