/** * Constructs a new <code>CollatingIterator</code> that will used the * specified comparator for ordering and have the specified initial * capacity. Child iterators will have to be * manually added using the {@link #addIterator(Iterator)} method. * * @param comp the comparator to use to sort, or null to use natural sort order * @param initIterCapacity the initial capacity for the internal list * of child iterators */ public CollatingIterator(final Comparator comp, final int initIterCapacity) { iterators = new ArrayList(initIterCapacity); setComparator(comp); }
/** * Constructs a new <code>CollatingIterator</code> that will used the * specified comparator for ordering and have the specified initial * capacity. Child iterators will have to be * manually added using the {@link #addIterator(Iterator)} method. * * @param comp the comparator to use to sort, or null to use natural sort order * @param initIterCapacity the initial capacity for the internal list * of child iterators */ public CollatingIterator(final Comparator comp, final int initIterCapacity) { iterators = new ArrayList(initIterCapacity); setComparator(comp); }
public void testGetSetComparator() { CollatingIterator iter = new CollatingIterator(); assertNull(iter.getComparator()); iter.setComparator(comparator); assertSame(comparator,iter.getComparator()); iter.setComparator(null); assertNull(iter.getComparator()); }
/** * Constructs a new <code>CollatingIterator</code> that will used the * specified comparator for ordering and have the specified initial * capacity. Child iterators will have to be * manually added using the {@link #addIterator(Iterator)} method. * * @param comp the comparator to use to sort, or null to use natural sort order * @param initIterCapacity the initial capacity for the internal list * of child iterators */ public CollatingIterator(final Comparator comp, final int initIterCapacity) { iterators = new ArrayList(initIterCapacity); setComparator(comp); }
/** * Constructs a new <code>CollatingIterator</code> that will used the * specified comparator for ordering and have the specified initial * capacity. Child iterators will have to be * manually added using the {@link #addIterator(Iterator)} method. * * @param comp the comparator to use to sort, or null to use natural sort order * @param initIterCapacity the initial capacity for the internal list * of child iterators */ public CollatingIterator(final Comparator comp, final int initIterCapacity) { iterators = new ArrayList(initIterCapacity); setComparator(comp); }
/** * Constructs a new <code>CollatingIterator</code> that will used the * specified comparator for ordering and have the specified initial * capacity. Child iterators will have to be * manually added using the {@link #addIterator(Iterator)} method. * * @param comp the comparator to use to sort, or null to use natural sort order * @param initIterCapacity the initial capacity for the internal list * of child iterators */ public CollatingIterator(final Comparator comp, final int initIterCapacity) { iterators = new ArrayList(initIterCapacity); setComparator(comp); }
/** * Constructs a new <code>CollatingIterator</code> that will used the * specified comparator for ordering and have the specified initial * capacity. Child iterators will have to be * manually added using the {@link #addIterator(Iterator)} method. * * @param comp the comparator to use to sort, or null to use natural sort order * @param initIterCapacity the initial capacity for the internal list * of child iterators */ public CollatingIterator(final Comparator comp, final int initIterCapacity) { iterators = new ArrayList(initIterCapacity); setComparator(comp); }
/** * Constructs a new <code>CollatingIterator</code> that will used the * specified comparator for ordering and have the specified initial * capacity. Child iterators will have to be * manually added using the {@link #addIterator(Iterator)} method. * * @param comp the comparator to use to sort, or null to use natural sort order * @param initIterCapacity the initial capacity for the internal list * of child iterators */ public CollatingIterator(final Comparator comp, final int initIterCapacity) { iterators = new ArrayList(initIterCapacity); setComparator(comp); }