Beispiel #1
0
 public void remRoad(int pos) throws InfraException {
   if (pos > 3 || pos < 0) throw new InfraException("Position out of range");
   Road road = allRoads[pos];
   if (road == null) throw new InfraException("Road at position " + pos + " does not exist");
   allRoads[pos] = null;
   alphaRoads = (Road[]) Arrayutils.remElement(alphaRoads, road);
   updateLanes();
   calculateWidth();
 }
Beispiel #2
0
 public void remRoad(Road r) throws InfraException {
   if (r == null) throw new InfraException("Parameter r is null");
   alphaRoads = (Road[]) Arrayutils.remElement(alphaRoads, r);
   for (int i = 0; i < 4; i++) {
     if (allRoads[i] == r) {
       allRoads[i] = null;
       updateLanes();
       calculateWidth();
       return;
     }
   }
   throw new InfraException("Road not found in this node");
 }
Beispiel #3
0
 /** Removes a sign configuration */
 public void remSignconfig(Sign[] conf) throws InfraException {
   if (conf == null) throw new InfraException("Parameter conf is null");
   int i = Arrayutils.findElement(signconfigs, conf);
   if (i == -1) throw new InfraException("Sign configuration is not in the list");
   signconfigs = (Sign[][]) Arrayutils.remElement(signconfigs, i);
 }