|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.me.parabola.imgfmt.app.net.RouteRestriction
public class RouteRestriction
A restriction in the routing graph. There may eventually be several types of these at which point we might consider splitting them into several classes. For the moment, just simple from-to-via restrictions. A from-to-via restriction says you can't go along arc "to" if you came to node to.getSource() == from.getSource() via the inverse arc of "from". We're using the inverse of "from" since that has the information we need for writing the Table C entry.
Field Summary | |
---|---|
static byte |
EXCEPT_BICYCLE
|
static byte |
EXCEPT_BUS
|
static byte |
EXCEPT_CAR
|
static byte |
EXCEPT_DELIVERY
|
static byte |
EXCEPT_TAXI
|
static byte |
EXCEPT_TRUCK
|
Constructor Summary | |
---|---|
RouteRestriction(RouteArc from,
RouteArc to,
byte exceptMask)
Create a route restriction. |
Method Summary | |
---|---|
int |
getOffsetC()
|
int |
getSize()
Size in bytes of the Table C entry. |
void |
setLast()
|
void |
setOffsetC(int offsetC)
|
void |
setOffsetSize(byte size)
|
void |
write(ImgFileWriter writer,
int tableOffset)
Writes a Table C entry. |
void |
writeOffset(ImgFileWriter writer)
Write this restriction's offset within Table C into a node record. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final byte EXCEPT_CAR
public static final byte EXCEPT_BUS
public static final byte EXCEPT_TAXI
public static final byte EXCEPT_DELIVERY
public static final byte EXCEPT_BICYCLE
public static final byte EXCEPT_TRUCK
Constructor Detail |
---|
public RouteRestriction(RouteArc from, RouteArc to, byte exceptMask)
from
- The inverse arc of "from" arc.to
- The "to" arc.Method Detail |
---|
public void write(ImgFileWriter writer, int tableOffset)
writer
- The writer.tableOffset
- The offset in NOD 1 of the tables area.public void writeOffset(ImgFileWriter writer)
public int getSize()
public void setOffsetC(int offsetC)
public int getOffsetC()
public void setOffsetSize(byte size)
public void setLast()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |