@Test(expected = NullPointerException.class) public void testInvalidAddLast() { ArrayDeque arrayDeque = new ArrayDeque(); arrayDeque.addLast(null); }
public void addLast(E element) { if (element == null) { throw new NullPointerException(); } elements[tail] = element; tail = (tail + 1) & (elements.length - 1); if (tail == head) { doubleCapacity(); } }
ArrayDeque { public void addLast(E element) { if (element == null) { throw new NullPointerException(); } elements[tail] = element; tail = (tail + 1) & (elements.length - 1); if (tail == head) { doubleCapacity(); } } }
ArrayDeque { public void addLast(E element) { if (element == null) { throw new NullPointerException(); } elements[tail] = element; tail = (tail + 1) & (elements.length - 1); if (tail == head) { doubleCapacity(); } } ArrayDeque();  ArrayDeque(int width, int height);  ArrayDeque(int numElements); }
ArrayDeque { public void addLast(E element) { if (element == null) { throw new NullPointerException(); } elements[tail] = element; tail = (tail + 1) & (elements.length - 1); if (tail == head) { doubleCapacity(); } } ArrayDeque();  ArrayDeque(int width, int height);  ArrayDeque(int numElements); void addFirst(E element); void addLast(E element); E getFirst(); E getLast(); E get(int index); void set(int index, E element); int capacity(); int size(); Object[] toArray(); }
ArrayDeque { public void addLast(E element) { if (element == null) { throw new NullPointerException(); } elements[tail] = element; tail = (tail + 1) & (elements.length - 1); if (tail == head) { doubleCapacity(); } } ArrayDeque();  ArrayDeque(int width, int height);  ArrayDeque(int numElements); void addFirst(E element); void addLast(E element); E getFirst(); E getLast(); E get(int index); void set(int index, E element); int capacity(); int size(); Object[] toArray();  }