private class TicTacToeMyHashMap.TTTHashString
extends java.lang.Object
| Modifier and Type | Field | Description |
|---|---|---|
private static char |
O |
A char holding an o
|
private int[] |
POWERS_OF_THREE |
A lookup table with powers of three where the each spot holds three ^ index
|
private int |
sizeOfHash |
The size of the hash this String will go into which is important because
it is a part of the custom hashCode method.
|
private static char |
SPACE |
A char holding a space
|
private java.lang.String |
value |
The String value of the TTTHashString.
|
private static char |
X |
A char holding an x
|
| Constructor | Description |
|---|---|
TTTHashString(java.lang.String v,
int size) |
| Modifier and Type | Method | Description |
|---|---|---|
int |
hashCode() |
Returns a hash code for each winner to be stored.
|
private java.lang.String value
private int sizeOfHash
private final int[] POWERS_OF_THREE
private static final char SPACE
private static final char X
private static final char O
public int hashCode()
hashCode in class java.lang.Object