@Override
        public int compareTo(TailStack<T> o) {
            if (this.size() > o.size())
                return 1;
            if (this.size() < o.size())
                return -1;
            if (this.size() == 0)
                return 0;

            Iterator<T> thisIterator = this.iterator();
            Iterator<T> thatIterator = o.iterator();

            while (thisIterator.hasNext()) {
                T thisNext = thisIterator.next();
                T thatNext = thatIterator.next();
                if (thisNext.compareTo(thatNext) > 0)
                    return 1;
                if (thisNext.compareTo(thatNext) < 0)
                    return -1;
            }
            return 0;
        }