@@ -0,0 +1,1805 @@
+package ru.matevosyan;%0A%0Aimport java.util.NoSuchElementException;%0A%0A/**%0A * Queue class.%0A * Created on 25.05.2017.%0A * @author Matevosyan Vardan%0A * @version 1.0%0A */%0A%0Apublic class Queue%3CE%3E implements IQueue%3CE%3E %7B%0A%0A    private Node%3CE%3E tail;%0A    private Node%3CE%3E head;%0A    private int size = 0;%0A%0A    /**%0A     * Add value to the Queues tail.%0A     * @param value is value that type which you declare in generics.%0A     */%0A%0A    @Override%0A    public E push(E value) %7B%0A        Node%3CE%3E tailElement = new Node%3C%3E(value);%0A        if (tail != null) %7B%0A            tail.next = tailElement;%0A        %7D%0A        tail = tailElement;%0A        if (head == null) %7B%0A            head = tailElement;%0A        %7D%0A        size++;%0A        return tailElement.item;%0A    %7D%0A%0A    /**%0A     * Remove value from the head.%0A     * @return value that type specify in generic.%0A     */%0A%0A    @Override%0A    public E pop() %7B%0A        Node%3CE%3E popElement;%0A        if (head != null) %7B%0A            popElement = head;%0A            head = head.next;%0A        %7D  else %7B%0A            throw new NoSuchElementException(%22No such element in the queue%22);%0A        %7D%0A        size--;%0A        return popElement.item;%0A    %7D%0A%0A    /**%0A     * Get value from the Queue.%0A     * @return value that type specify in generic.%0A     */%0A%0A    @Override%0A    public E peek() %7B%0A        E peekElement;%0A        if (head != null) %7B%0A            peekElement = head.item;%0A        %7D  else %7B%0A            throw new NoSuchElementException(%22No such element in the queue%22);%0A        %7D%0A        return peekElement;%0A    %7D%0A%0A%0A    /**%0A     * Class Node describe linkedList entry.%0A     * @param %3CE%3E parameter that defined when create an instance of a class.%0A     */%0A%0A    private static class Node%3CE%3E %7B%0A        E item;%0A        Node%3CE%3E next;%0A%0A        Node(E element) %7B%0A            this.item = element;%0A        %7D%0A    %7D%0A%7D%0A

add Queue.java