All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class busrider.MutableSegment

java.lang.Object
   |
   +----busrider.MutableSegment

public class MutableSegment
extends Object
This class represents a segment of a route. It is used only while building the Board, and is of no interest to the participant.

A segment connects two junctions, has a length, is part of a route, and (eventually) has a unique index.


Constructor Index

 o MutableSegment(MutableJunction, MutableJunction, int, MutableRoute)
constructs an object with the given junctions, length, and route.

Method Index

 o parse(StringTokenizer, ItemCollection)
parses a routeless segment from a StringTokenizer.

Constructors

 o MutableSegment
 public MutableSegment(MutableJunction from,
                       MutableJunction to,
                       int length,
                       MutableRoute route)
constructs an object with the given junctions, length, and route.

Methods

 o parse
 public static MutableSegment parse(StringTokenizer stok,
                                    ItemCollection junctions)
parses a routeless segment from a StringTokenizer. The tokens must be: length(int), from-junc-name, to-junc-name.


All Packages  Class Hierarchy  This Package  Previous  Next  Index