public class Route extends java.util.ArrayList<RouteElement>
Author: gainsley
Constructor and Description |
---|
Route()
Constructs an empty route
|
Route(java.util.Collection<RouteElement> c)
Constructs a route containing the elements of the passed route,
in the order they are returned by the route iterator, and having
the same start and end RouteElement (if Collection is a Route).
|
Modifier and Type | Method and Description |
---|---|
RouteElementPort |
getEnd()
Get the end of the Route
|
RouteElementPort |
getStart()
Get the start of the Route
|
boolean |
isRouteReversed()
True if the route is reversed, false if it is not reversed
|
boolean |
replaceBisectPin(RouteElementPort bisectPin,
RouteElementPort replacement)
Attempts to replace the bisectPin by replacement.
|
boolean |
replaceExistingRedundantPin(RouteElementPort pinRE,
RouteElementPort replacementRE,
PolyMerge stayInside,
EditingPreferences ep)
Attempts to replace an existing pin that has been made redundant by
some node in the route, such as a contact cut.
|
boolean |
replacePin(RouteElementPort pin,
RouteElementPort replacement,
PolyMerge stayInside,
EditingPreferences ep)
Attempts to replace pin with replacement.
|
void |
reverseRoute()
Reverse the Route.
|
void |
setEnd(RouteElementPort endRE)
Sets the end of the Route
|
void |
setStart(RouteElementPort startRE)
Sets the start of the Route
|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeRange, retainAll, set, size, subList, toArray, toArray, trimToSize
public Route()
public Route(java.util.Collection<RouteElement> c)
public void setStart(RouteElementPort startRE)
public RouteElementPort getStart()
public void setEnd(RouteElementPort endRE)
public RouteElementPort getEnd()
public void reverseRoute()
public boolean isRouteReversed()
public boolean replacePin(RouteElementPort pin, RouteElementPort replacement, PolyMerge stayInside, EditingPreferences ep)
pin
- the pin to replacereplacement
- the replacementstayInside
- a polygonal area in which the new arc must reside (if not null).ep
- EditingPreferences with default sizespublic boolean replaceBisectPin(RouteElementPort bisectPin, RouteElementPort replacement)
bisectPin
- the port pin to replacereplacement
- the port pin to replace bisectPin with.public boolean replaceExistingRedundantPin(RouteElementPort pinRE, RouteElementPort replacementRE, PolyMerge stayInside, EditingPreferences ep)
pinRE
- the pin to replacereplacementRE
- the replacementstayInside
- a polygonal area in which the new arc must reside (if not null).ep
- EditingPreferences with default sizes