@Override
        public boolean hasNext() {
            //return history.size() > 1 ||
            //    (history.firstElement().lastOctent < 8 && history.firstElement().subTree.internal_node);

            try {
                if (next == null)
                    next = next();

                return true;
            } catch (NoSuchElementException e) {
                return false;
            }
        }