All Packages Class Hierarchy This Package Previous Next Index
Class busrider.MutableJunction
java.lang.Object
|
+----busrider.Indexed
|
+----busrider.Item
|
+----busrider.MutableJunction
- public class MutableJunction
- extends Item
This mutable class represents a junction.
It is used only while building the Board, and is of no interest to the
participant.
A junction has a name, and a mutable collection of segments
connecting to it.
It may also have a popularity (the likelihood of being selected);
if so it is a terminus.
For graphical purposes, it also has x- and y- coordinates.
Constructor Index
-
MutableJunction(String, int, int, int, int)
- constructs an object with the given name, index, popularity,
coordinates, and no segments.
Method Index
-
parse(StringTokenizer, boolean, int)
- parses a MutableJunction from a
StringTokenizer
.
Constructors
MutableJunction
public MutableJunction(String name,
int index,
int popul,
int px,
int py)
- constructs an object with the given name, index, popularity,
coordinates, and no segments.
Methods
parse
public static MutableJunction parse(StringTokenizer stok,
boolean terminus,
int index)
- parses a MutableJunction from a
StringTokenizer
.
If a terminus, the tokens must be: popularity(int), x-coord(int),
y-coord(int), name.
If a plain junction, the tokens must be: x-coord(int),
y-coord(int), name.
Initially, the junction has no segments.
All Packages Class Hierarchy This Package Previous Next Index