|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--geography.AddressFinder.Street
A class that represents information about a particular street. This class is only used by AddressFinder, and might go away if AddressFinder changed. So it's convenient to define it right here inside AddressFinder! This is called an "inner class." Its full name is actually AddressFinder.Street.
At present, the only real information that we store is the "little map" of addresses along that street. But this class could be expanded later, for example to make it possible to look up intersections by their cross streets ("Charles and 34th St" as well as "3400 Charles St").
| Field Summary | |
(package private) geography.Intersection |
isctArbitrary
|
(package private) java.util.SortedMap |
smIntersections
Maps house numbers to Intersections along this street. |
(package private) geography.StreetSegment |
ssArbitrary
One arbitrary segment of the street. |
(package private) AddressFinder.Street |
superStreet
A street of which this street is a mere segment. |
| Constructor Summary | |
AddressFinder.Street(geography.StreetSegment ss)
Constructor: New street, no information about it yet. |
|
| Method Summary | |
void |
addIntersection(geography.Point p,
java.lang.Integer housenum)
Add a new house number near the intersection at point p. |
geography.Intersection |
findIntersectionNear(int housenum)
Finds the intersection closest to the given house number on this street. |
int |
numKnownAddresses()
Total number of addresses known for this street. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
geography.StreetSegment ssArbitrary
geography.Intersection isctArbitrary
AddressFinder.Street superStreet
java.util.SortedMap smIntersections
| Constructor Detail |
public AddressFinder.Street(geography.StreetSegment ss)
| Method Detail |
public void addIntersection(geography.Point p,
java.lang.Integer housenum)
public geography.Intersection findIntersectionNear(int housenum)
public int numKnownAddresses()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||