Example #1
0
 /**
  * Set the Iterator at the given index
  *
  * @param index      index of the Iterator to replace
  * @param iterator   Iterator to place at the given index
  * @throws IndexOutOfBoundsException if index < 0 or index > size()
  * @throws IllegalStateException if I've already started iterating
  * @throws NullPointerException if the iterator is null
  */
 public void setIterator(int index, java.util.Iterator <Object> iterator)
 {//throws IndexOutOfBoundsException {
     checkLocked();
     if (iterator == null)
     {
         throw new java.lang.NullPointerException("Iterator must not be null");
     }
     iteratorChain.set(index, iterator);
 }
Example #2
0
        /**
         * Replace the Comparator at the given index in the
         * ComparatorChain, using the given sort order
         *
         * @param index      index of the Comparator to replace
         * @param comparator Comparator to set
         * @param reverse    false = forward sort order; true = reverse sort order
         */
        public void setComparator(int index, java.util.Comparator <Object> comparator, bool reverse)
        {
            checkLocked();

            comparatorChain.set(index, comparator);
            if (reverse == true)
            {
                orderingBits.set(index);
            }
            else
            {
                orderingBits.clear(index);
            }
        }