protected void setTravelType(String t) { if (type == null || !type.toString().equals(t)) // Make sure we have a valid type { type = loadType(t); // Set the type of the vehicle MarkDirty(); // Mark the vehicle as dirty } // End of if statement } // End of setTravelType(String t)
// This function will set the type of the vehicle protected void setTravelType(TravelTypes t) { if (type == null || !type.equals(t)) // Make sure we have a valid type { type = t; // Set the type to t MarkDirty(); // Mark the vehicle as dirty } // End of if statement } // End of setTravelType(TravelType t)
public ArrayList<Segment> getSchedule() { if (schedule == null) schedule = Segment.LoadAll("where ModeType = '" + type.toString() + "' and VehicleID= " + id); return schedule; }
// This function returns the TravelType of the vehicle public String getTravelType() { return type.toString(); } // End of getTravelType