Statistics
| Branch: | Revision:

iof-tools / BGPpysim / util / myqueue.py @ de0e8e06

History | View | Annotate | Download (383 Bytes)

1
class MyQueue(object):
2

    
3
    def __init__(self):
4
        self.q = []
5

    
6
    def push(self, item):
7
        self.q.append(item)
8

    
9
    def enqueue(self, item):
10
        self.q.append(item)
11

    
12
    def pop(self):
13
        return self.q.pop(0)
14

    
15
    def dequeue(self):
16
        return self.q.pop(0)
17

    
18
    def get(self, item):
19
        return self.q[0]
20

    
21
    def isEmpty(self):
22
        return not self.q