Package jadex.bdi.examples.blackjack
Class Card
- java.lang.Object
-
- jadex.bdi.examples.blackjack.Card
-
public class Card extends java.lang.ObjectCard information.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()Get a clone of thisCard.booleanequals(java.lang.Object obj)Test the equality of thisCardand an objectobj.java.lang.StringgetColor()Get the col of this Card.java.lang.StringgetType()Get the type of this Card.intgetValue()Get the val of this Card.inthashCode()voidsetColor(java.lang.String col)Set the col of this Card.voidsetType(java.lang.String type)Set the type of this Card.voidsetValue(int val)Set the val of this Card.java.lang.StringtoString()Get a string representation of thisCard.
-
-
-
Constructor Detail
-
Card
public Card()
Default Constructor.
Card.
-
Card
public Card(java.lang.String type, java.lang.String color, int value)Default Constructor.
Card.
-
Card
public Card(Card proto)
Clone Constructor.
Card.
proto to this instance.- Parameters:
proto- The prototype instance.
-
-
Method Detail
-
getColor
public java.lang.String getColor()
Get the col of this Card.- Returns:
- col
-
setColor
public void setColor(java.lang.String col)
Set the col of this Card.- Parameters:
col- the value to be set
-
getType
public java.lang.String getType()
Get the type of this Card.- Returns:
- type
-
setType
public void setType(java.lang.String type)
Set the type of this Card.- Parameters:
type- the value to be set
-
getValue
public int getValue()
Get the val of this Card.- Returns:
- val
-
setValue
public void setValue(int val)
Set the val of this Card.- Parameters:
val- the value to be set
-
toString
public java.lang.String toString()
Get a string representation of thisCard.- Overrides:
toStringin classjava.lang.Object- Returns:
- The string representation.
-
clone
public java.lang.Object clone()
Get a clone of thisCard.- Overrides:
clonein classjava.lang.Object- Returns:
- a shalow copy of this instance.
-
equals
public boolean equals(java.lang.Object obj)
Test the equality of thisCardand an objectobj.- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- the object this test will be performed with- Returns:
- false if
objis not ofCardclass, true if all attributes are equal.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-