# Stone
Date: 2011-05-10

## jrummikub.model
Class Stone

    java.lang.Object
      jrummikub.model.Stone

All Implemented Interfaces:
  Sizeable

    public class Stone

extends java.lang.Object
implements Sizeable

Basic Rummikub Stone

Constructor Summary
`Stone(int value, StoneColor color)` Creates a normal stone of a given color and value
`Stone(StoneColor color)` Creates a joker of the given color.

Method Summary
`StoneColor` `getColor()` Returns the color of the stone.
`float` `getHeight()` Get the height of the object
`int` `getValue()` Returns the value of the stone.
`float` `getWidth()` Get the width of the object
`boolean` `isJoker()` Returns whether the stone is a joker or not.
`java.lang.String` `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Stone

    public Stone(StoneColor color)

  Creates a joker of the given color. The color is only used for displaying.

  Parameters:
    `color` - joker color

### Stone

    public Stone(int value,
                 StoneColor color)

  Creates a normal stone of a given color and value

  Parameters:
    `value` - stone value
    `color` - stone color

Method Detail

### getColor

    public StoneColor getColor()

  Returns the color of the stone.

  Returns:
    stone color

### isJoker

    public boolean isJoker()

  Returns whether the stone is a joker or not.

  Returns:
    true when the stone is a joker

### getValue

    public int getValue()

  Returns the value of the stone. Don't use this value for jokers.

  Returns:
    stone value

### getWidth

    public float getWidth()

  Description copied from interface: `Sizeable`
  Get the width of the object

  Specified by:
    `getWidth` in interface `Sizeable`
  Returns:
    object width

### getHeight

    public float getHeight()

  Description copied from interface: `Sizeable`
  Get the height of the object

  Specified by:
    `getHeight` in interface `Sizeable`
  Returns:
    object height

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`