All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class busrider.Route

java.lang.Object
   |
   +----busrider.Indexed
           |
           +----busrider.Item
                   |
                   +----busrider.Route

public class Route
extends Item
This immutable class represents a route. A route has a name, a price, and a collection of segments.


Constructor Index

 o Route(MutableRoute, BoardBuilder)
constructs an object like the given MutableRoute, with the given index.

Method Index

 o equals(Object)
compares two objects.
 o getPrice()
returns the price.
 o getSegment(int)
returns the idx'th segment.
 o getSegmentQuan()
returns the number of segments.

Constructors

 o Route
 public Route(MutableRoute mr,
              BoardBuilder bb)
constructs an object like the given MutableRoute, with the given index.

Methods

 o equals
 public boolean equals(Object ob)
compares two objects.

Overrides:
equals in class Item
 o getPrice
 public int getPrice()
returns the price.

 o getSegmentQuan
 public int getSegmentQuan()
returns the number of segments.

 o getSegment
 public Segment getSegment(int idx)
returns the idx'th segment.


All Packages  Class Hierarchy  This Package  Previous  Next  Index