Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2014
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. public class test<E> {
  2. List<E> input = new ArrayList<>();
  3. public test(List<E> input) {
  4. this.input = input
  5. // modify this constructor if necessary, but do not remove default constructor
  6. }
  7. // add other constructors if necessary
  8. /**
  9. * Returns the queue that adds an item into the tail of this queue without modifying this queue.
  10. * <pre>
  11. * e.g.
  12. * When this queue represents the queue (2, 1, 2, 2, 6) and we enqueue the value 4 into this queue,
  13. * this method returns a new queue (2, 1, 2, 2, 6, 4)
  14. * and this object still represents the queue (2, 1, 2, 2, 6) .
  15. * </pre>
  16. * If the element e is null, throws IllegalArgumentException.
  17. * @param e
  18. * @return
  19. * @throws IllegalArgumentException
  20. */
  21. public test<E> enqueue(E e) {
  22. return null;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement