public class Cell
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private char |
character
Cell character.
|
private Color |
color
Cell color.
|
static Cell |
EMPTY_CELL
Immutable empty cell (space character with normal color).
|
| Constructor and Description |
|---|
Cell(char character,
Color color)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
char |
character()
Get cell character.
|
Color |
color()
Get cell color.
|
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
static boolean |
isSpace(Cell cell)
Check if specified cell represents a space character.
|
static boolean |
isValid(Cell cell)
Check if cell represents real character and color.
|
public static final Cell EMPTY_CELL
private final char character
private final Color color
public Cell(char character,
Color color)
character - Cell character.color - Cell color.public char character()
public Color color()
public static boolean isValid(Cell cell)
cell - Cell instance to check.true if cell can be used to display character.public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectObject.equals(java.lang.Object)public static boolean isSpace(Cell cell)
cell - Cell to check.true if cell holds a space character.