class RefreshQ(UniqueItemSizeLimitedPriorityQueue):
def __init__(self, limit: int):
super().__init__(limit)
def removeItem(self,item:str):
super().getAsList().remove(item)
def insert(self, data):
# FILO 1st in last out
if super().contains(data):
self.removeItem(data)
super().insert(data)
class RefreshQ(UniqueItemSizeLimitedPriorityQueue):
def __init__(self, limit: int):
super().__init__(limit)
def removeItem(self, item: str):
super().getAsList().remove(item)
def insert(self, data):
# FILO 1st in last out
if super().contains(data):
self.removeItem(data)
super().insert(data)