public class Side
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static java.util.LinkedHashMap<java.lang.String,Side> |
allSides
These are the default instances of
Side . |
static Side |
BLUE
Blue
|
static Side |
GREEN
Green
|
static Side |
ORANGE
Orange
|
static Side |
PURPLE
Purple
|
static Side |
RED
Red
|
private java.lang.String |
side
Name of this Side
|
static Side |
WHITE
White
|
Constructor and Description |
---|
Side(java.lang.String side)
Constructs an instance of Side.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getSide()
Gets the name of this Side.
|
static Side |
getSideFor(java.lang.String sideName)
Find the Side with the given name.
|
java.lang.String |
toString()
Returns a String containing the name of this Side.
|
protected static java.util.LinkedHashMap<java.lang.String,Side> allSides
Side
.public static final Side RED
public static final Side BLUE
public static final Side ORANGE
public static final Side PURPLE
public static final Side GREEN
public static final Side WHITE
private java.lang.String side
public Side(java.lang.String side)
side
- The name of this Side.java.lang.IllegalArgumentException
- if the Side already exists.public java.lang.String getSide()
public java.lang.String toString()
toString
in class java.lang.Object
public static Side getSideFor(java.lang.String sideName)
sideName
- Given name of Side