def contains(self, pathNode: PathNode): """returns true if the time node already contains the trip node passed""" # todo if pathNode.getPathID() in self.paths: return True else: return False
def updatePath(self, node: PathNode): id = node.getPathID() if self.paths.__contains__(id): old = self.paths[id] old.setCount(node.getCount() + old.getCount()) self.paths[id] = old else: self.paths[id] = node
def addPath(self, node: PathNode): """takes the passed trip node and adds it to the list of trips""" self.paths[node.getPathID()] = node
def findPath(self, pathNode: PathNode): """this method will return the node passed that is in the list of trips""" # todo return self.paths[pathNode.getPathID()]