forked from ibnullify/De-BilliardStick
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Deque.java
31 lines (20 loc) · 758 Bytes
/
Deque.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
public interface Deque<T>{
//adds a value to the front of the deque
public void addFirst ( T val );
//adds a value to the end of the deque
public void addLast ( T val );
//removes a value from the front of the deque
public T removeFirst ();
//removes a value from the end of the deque
public T removeLast ();
//returns the value of the first node of the deque
public T peekFirst();
//returns the value of the last node of the deque
public T peekLast();
//returns the size of the deque
public int size();
/******************Not from API*******************/
/**inherited from interface java.util.Collection**/
//checks if the deque is empty
public boolean isEmpty();
}