if(sourceComparator != grouper.getComparator()) { grouper.setComparator(sourceComparator); rebuildSeparators(); return;
if(sourceComparator != grouper.getComparator()) { grouper.setComparator(sourceComparator); rebuildSeparators(); return;
if(sourceComparator != grouper.getComparator()) { grouper.setComparator(sourceComparator); rebuildSeparators(); return;
/** * Create a new {@link SeparatorInjectorList} that groups together like * items using the Comparator from the <code>source</code>. Elements * that the {@link Comparator} determines are equal will share a common * separator. * * @param source the sorted list of items with a Comparator that defines * the group boundaries * @param defaultLimit the maximum number of items to include in a * group; all remaining items will be truncated */ public SeparatorInjectorList(SortedList<E> source, int defaultLimit) { super(source); this.defaultLimit = defaultLimit; // prepare the groups GrouperClient grouperClient = new GrouperClient(); this.grouper = new Grouper<E>(source, grouperClient); // initialize separators state rebuildSeparators(); // handle changes via the grouper source.addListEventListener(this); }
/** * Create a new {@link SeparatorInjectorList} that groups together like * items using the Comparator from the <code>source</code>. Elements * that the {@link Comparator} determines are equal will share a common * separator. * * @param source the sorted list of items with a Comparator that defines * the group boundaries * @param defaultLimit the maximum number of items to include in a * group; all remaining items will be truncated */ public SeparatorInjectorList(SortedList<E> source, int defaultLimit) { super(source); this.defaultLimit = defaultLimit; // prepare the groups GrouperClient grouperClient = new GrouperClient(); this.grouper = new Grouper<E>(source, grouperClient); // initialize separators state rebuildSeparators(); // handle changes via the grouper source.addListEventListener(this); }
/** * Create a new {@link SeparatorInjectorList} that groups together like * items using the Comparator from the <code>source</code>. Elements * that the {@link Comparator} determines are equal will share a common * separator. * * @param source the sorted list of items with a Comparator that defines * the group boundaries * @param defaultLimit the maximum number of items to include in a * group; all remaining items will be truncated */ public SeparatorInjectorList(SortedList<E> source, int defaultLimit) { super(source); this.defaultLimit = defaultLimit; // prepare the groups GrouperClient grouperClient = new GrouperClient(); this.grouper = new Grouper<E>(source, grouperClient); // initialize separators state rebuildSeparators(); // handle changes via the grouper source.addListEventListener(this); }