public void enqueue(E element) {
        if (size() == 0) {
            first = new Node<E>(null, null);
            first.setElement(element);
            last = first;
        } else {
            Node<E> newNode = new Node<E>(null, last);
            newNode.setElement(element);
            last.setNext(newNode);
            last = newNode;
        }
        size++;
    }