public class Card
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
col
Attribute for slot col.
|
protected java.lang.String |
type
Attribute for slot type.
|
protected int |
val
Attribute for slot val.
|
| Constructor and Description |
|---|
Card()
Default Constructor.
|
Card(Card proto)
Clone Constructor.
|
Card(java.lang.String type,
java.lang.String color,
int value)
Default Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Get a clone of this
Card. |
boolean |
equals(java.lang.Object obj)
Test the equality of this
Card
and an object obj. |
java.lang.String |
getColor()
Get the col of this Card.
|
java.lang.String |
getType()
Get the type of this Card.
|
int |
getValue()
Get the val of this Card.
|
int |
hashCode() |
void |
setColor(java.lang.String col)
Set the col of this Card.
|
void |
setType(java.lang.String type)
Set the type of this Card.
|
void |
setValue(int val)
Set the val of this Card.
|
java.lang.String |
toString()
Get a string representation of this
Card. |
protected java.lang.String col
protected java.lang.String type
protected int val
public Card()
Card.public Card(java.lang.String type,
java.lang.String color,
int value)
Card.public Card(Card proto)
Card.proto to this instance.proto - The prototype instance.public java.lang.String getColor()
public void setColor(java.lang.String col)
col - the value to be setpublic java.lang.String getType()
public void setType(java.lang.String type)
type - the value to be setpublic int getValue()
public void setValue(int val)
val - the value to be setpublic java.lang.String toString()
Card.toString in class java.lang.Objectpublic java.lang.Object clone()
Card.clone in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
Card
and an object obj.equals in class java.lang.Objectobj - the object this test will be performed withobj is not of Card class,
true if all attributes are equal.public int hashCode()
hashCode in class java.lang.Object