public class SpeedRestrictionList extends java.util.ArrayList<SpeedRestriction>
Constructor and Description |
---|
SpeedRestrictionList()
The speed restriction list
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(SpeedRestriction sp) |
SpeedRestriction |
get(int i) |
void |
mergeSimilar() |
static void |
readSpeedRestriction(java.io.StreamTokenizer streamtokenizer,
Block block) |
double |
returnMaxsp(double a,
double b) |
java.util.ArrayList<SpeedRestrictionList> |
split(double distance) |
public boolean add(SpeedRestriction sp)
add
in interface java.util.Collection<SpeedRestriction>
add
in interface java.util.List<SpeedRestriction>
add
in class java.util.ArrayList<SpeedRestriction>
sp
- : speed restriction listpublic void mergeSimilar()
public java.util.ArrayList<SpeedRestrictionList> split(double distance)
distance
- stores the corresponding distanceArrayList
of SpeedRestrictionList
public SpeedRestriction get(int i)
get
in interface java.util.List<SpeedRestriction>
get
in class java.util.ArrayList<SpeedRestriction>
i
- SpeedRestriction
public double returnMaxsp(double a, double b)
public static void readSpeedRestriction(java.io.StreamTokenizer streamtokenizer, Block block) throws java.io.IOException
java.io.IOException