public boolean hasNext() {
            if (current == null) {
                if (stack.isEmpty()) {
                    return false;
                } else {
                    current = stack.pop();
                    pushNode(current.right);
                }
            }
            return true;
        }