/** * Creates a {@link SortedList} that sorts the specified {@link EventList}. * All elements in the specified {@link EventList} must implement {@link Comparable}. * * @param source the {@link EventList} to be sorted */ public static <E extends Comparable<? super E>> SortedList<E> create(EventList<E> source) { return new SortedList<E>(source); }
/** * Creates a {@link UniqueList} that determines uniqueness using the * specified {@link Comparator}. * * @param source the {@link EventList} containing duplicates to remove * @param comparator the {@link Comparator} used to determine equality */ public UniqueList(EventList<E> source, Comparator<? super E> comparator) { this(new SortedList<E>(source, comparator), (Void) null); }
/** * Creates a {@link SortedList} that sorts the specified {@link EventList}. * All elements in the specified {@link EventList} must implement {@link Comparable}. * * @param source the {@link EventList} to be sorted */ public static <E extends Comparable<? super E>> SortedList<E> create(EventList<E> source) { return new SortedList<E>(source); }
/** * Creates a {@link UniqueList} that determines uniqueness using the * specified {@link Comparator}. * * @param source the {@link EventList} containing duplicates to remove * @param comparator the {@link Comparator} used to determine equality */ public UniqueList(EventList<E> source, Comparator<? super E> comparator) { this(new SortedList<E>(source, comparator), (Void) null); }
/** * Creates a {@link UniqueList} that determines uniqueness using the * specified {@link Comparator}. * * @param source the {@link EventList} containing duplicates to remove * @param comparator the {@link Comparator} used to determine equality */ public UniqueList(EventList<E> source, Comparator<? super E> comparator) { this(new SortedList<E>(source, comparator), (Void) null); }
/** * Creates a {@link GroupingList} that determines groups using the specified * {@link Comparator}. * * @param source the {@link EventList} containing elements to be grouped * @param comparator the {@link Comparator} used to determine groupings */ public GroupingList(EventList<E> source, Comparator<? super E> comparator) { this(new SortedList<E>(source, comparator), comparator, null); }
/** * Creates a {@link GroupingList} that determines groups using the specified * {@link Comparator}. * * @param source the {@link EventList} containing elements to be grouped * @param comparator the {@link Comparator} used to determine groupings */ public GroupingList(EventList<E> source, Comparator<? super E> comparator) { this(new SortedList<E>(source, comparator), comparator, null); }
/** * Creates a {@link ThresholdList} that provides range-filtering on the * specified {@link EventList} using the specified {@link Evaluator}. */ public ThresholdList(EventList<E> source, Evaluator<E> evaluator) { this(new SortedList<E>(source, new ThresholdComparator<E>(evaluator)), evaluator); }
/** * Creates a {@link ThresholdList} that provides range-filtering on the * specified {@link EventList} using the specified {@link Evaluator}. */ public ThresholdList(EventList<E> source, Evaluator<E> evaluator) { this(new SortedList<E>(source, new ThresholdComparator<E>(evaluator)), evaluator); }
/** * Creates a {@link ThresholdList} that provides range-filtering on the * specified {@link EventList} using the specified {@link Evaluator}. */ public ThresholdList(EventList<E> source, Evaluator<E> evaluator) { this(new SortedList<E>(source, new ThresholdComparator<E>(evaluator)), evaluator); }
public HoursByDayReport(final PresentationModel model) { this.model = model; this.model.getEventBus().register(this); this.hoursByDayList = new SortedList<>(new BasicEventList<HoursByDay>()); calculateHours(); }
/** * Create report from data. * @param filter */ public AccumulatedActivitiesReport(final Collection<ProjectActivity> data, Filter filter) { this.data = data; this.filter = filter; this.accumulatedActivitiesByDay = new SortedList<AccumulatedProjectActivity>(new BasicEventList<AccumulatedProjectActivity>()); accumulate(); }
public HoursByProjectReport(final PresentationModel model) { this.model = model; this.model.getEventBus().register(this); this.hoursByProjectList = new SortedList<HoursByProject>(new BasicEventList<HoursByProject>()); calculateHours(); }
public InitializationData(EventList<E> sourceElements, Format<E> format, ExpansionModel<E> expansionModel) { this.format = format; this.expansionModel = expansionModel; this.sourceNodes = new FunctionList<E,Node<E>>(sourceElements, new ElementToTreeNodeFunction<E>(format, expansionModel), NO_OP_FUNCTION); this.nodeComparator = comparatorToNodeComparator(format); this.sortedList = new SortedList<Node<E>>(sourceNodes, nodeComparator); }
public InitializationData(EventList<E> sourceElements, Format<E> format, ExpansionModel<E> expansionModel) { this.format = format; this.expansionModel = expansionModel; this.sourceNodes = new FunctionList<E,Node<E>>(sourceElements, new ElementToTreeNodeFunction<E>(format, expansionModel), NO_OP_FUNCTION); this.nodeComparator = comparatorToNodeComparator(format); this.sortedList = new SortedList<Node<E>>(sourceNodes, nodeComparator); }
/** * Private constructor is used as a Java-language hack to allow us to save * a reference to the specified {@link UniqueList}. */ private PopularityList(UniqueList<E> uniqueList) { super(new SortedList<E>(uniqueList, new PopularityComparator<E>(uniqueList))); this.uniqueList = uniqueList; // listen for changes to the source list source.addListEventListener(this); }
/** * Private constructor is used as a Java-language hack to allow us to save * a reference to the specified {@link UniqueList}. */ private PopularityList(UniqueList<E> uniqueList) { super(new SortedList<E>(uniqueList, new PopularityComparator<E>(uniqueList))); this.uniqueList = uniqueList; // listen for changes to the source list source.addListEventListener(this); }
public void run() { SortedList<Object> sorted = new SortedList<Object>(GlazedLists.eventListOf(elements)); // auto completion support for selection list support = AutoCompleteSupport.install(contextBox, sorted); support.setStrict(true); support.setFilterMode(TextMatcherEditor.CONTAINS); } };
@Benchmark @Warmup(iterations = 5) @Measurement(iterations = 10) @Fork(1) public EventList<Integer> testBarcode() { EventList<Integer> baseCopy = GlazedLists.eventList(base); EventList<Integer> sortedBase = new SortedList<>(baseCopy); doTest(baseCopy, sortedBase); return sortedBase; }
SortedList<Row> sorted = new SortedList<Row>( list, new Comparator<Row>() {