Exemplo n.º 1
0
 public void setReturnWhenEmptyDestination(Location destination) {
   Location old = _rweDestination;
   _rweDestination = destination;
   if ((old != null && !old.equals(destination))
       || (destination != null && !destination.equals(old))) {
     setDirtyAndFirePropertyChange(RETURN_WHEN_EMPTY_CHANGED_PROPERTY, null, null);
   }
 }
Exemplo n.º 2
0
 /**
  * Sets the final destination for a car.
  *
  * @param destination The final destination for this car.
  */
 public void setFinalDestination(Location destination) {
   Location old = _finalDestination;
   if (old != null) {
     old.removePropertyChangeListener(this);
   }
   _finalDestination = destination;
   if (_finalDestination != null) {
     _finalDestination.addPropertyChangeListener(this);
   }
   // log.debug("Next destination for car ("+toString()+") old: "+old+" new: "+destination);
   if ((old != null && !old.equals(destination))
       || (destination != null && !destination.equals(old))) {
     setDirtyAndFirePropertyChange(FINAL_DESTINATION_CHANGED_PROPERTY, old, destination);
   }
 }