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
-
Route(MutableRoute, BoardBuilder)
- constructs an object like the given MutableRoute, with the given
index.
Method Index
-
equals(Object)
- compares two objects.
-
getPrice()
- returns the price.
-
getSegment(int)
- returns the
idx
'th segment.
-
getSegmentQuan()
- returns the number of segments.
Constructors
Route
public Route(MutableRoute mr,
BoardBuilder bb)
- constructs an object like the given MutableRoute, with the given
index.
Methods
equals
public boolean equals(Object ob)
- compares two objects.
- Overrides:
- equals in class Item
getPrice
public int getPrice()
- returns the price.
getSegmentQuan
public int getSegmentQuan()
- returns the number of segments.
getSegment
public Segment getSegment(int idx)
- returns the
idx
'th segment.
All Packages Class Hierarchy This Package Previous Next Index