|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.moyoman.debug.Debug | +--org.moyoman.debug.SOI
This class represents groups of stones and empty points that are associated with them.
Field Summary | |
private ArrayList |
groups
Each element is an ArrayList containing Stone objects. |
private HashMap |
points
Each key is an Integer, and each value is a Point array. |
Fields inherited from class org.moyoman.debug.Debug |
|
Constructor Summary | |
SOI(String h)
Create a new SOI object. |
Method Summary | |
int |
addGroup(Stone[] stones)
Add a group of stones. |
void |
addPoints(int group,
Point[] pts)
Add points to be associated with the specific group. |
Stone[] |
getGroupStones(int group)
Return the stones in a particular group. |
Point[] |
getPoints(int group)
Get the points associated with this group. |
int |
getTotalGroups()
Return the total number of groups. |
DebugType |
getType()
Get the debug type of this object. |
static void |
main(String[] args)
This method is used for unit testing. |
String |
toString()
Return a String representation of this object. |
Methods inherited from class org.moyoman.debug.Debug |
getHeaderType |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private ArrayList groups
private HashMap points
Constructor Detail |
public SOI(String h)
h
- The header.Method Detail |
public static void main(String[] args)
public int addGroup(Stone[] stones)
stones
- An array of stones that are one group.
public Stone[] getGroupStones(int group) throws IndexOutOfBoundsException
group
- The group number.
IndexOutOfBoundsException
- - Thrown if the
group number is invalid.public int getTotalGroups()
public void addPoints(int group, Point[] pts) throws IndexOutOfBoundsException
group
- - The group number.pts
- - The array of points to be added.
IndexOutOfBoundsException
- - Thrown if the
group number is invalid.public Point[] getPoints(int group) throws IndexOutOfBoundsException
group
- - The group number.
IndexOutOfBoundsException
- - Thrown if the
group number is invalid.public String toString()
toString
in class Object
public DebugType getType()
getType
in class Debug
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |