/** * Adapts the given <code>source</code> to the PieDataset interface. The * given <code>keyFunction</code> is then applied to each element of the * <code>source</code> to produce the unique key for the element and the * given <code>valueFunction</code> is applied to produce the value for an * element. * * <p>This constructor should be used when the elements in * <code>source</code> do not need to be grouped together in order to * represent pie data. * * @param source the {@link EventList} containing the data to chart * @param keyFunction produces the keys of the source elements in the pie chart * @param valueFunction produces the values of the source elements in the pie chart */ public EventListPieDataset(EventList<E> source, FunctionList.Function<E, Comparable<K>> keyFunction, FunctionList.Function<E, Number> valueFunction) { this.groupingList = null; this.sourceList = source; this.keyList = new FunctionList(source, keyFunction); this.valueList = new FunctionList(source, valueFunction); source.addListEventListener(this.datasetEventListener); }
/** * Adapts the given <code>source</code> to the PieDataset interface. The * given <code>keyFunction</code> is then applied to each element of the * <code>source</code> to produce the unique key for the element and the * given <code>valueFunction</code> is applied to produce the value for an * element. * * <p>This constructor should be used when the elements in * <code>source</code> do not need to be grouped together in order to * represent pie data. * * @param source the {@link EventList} containing the data to chart * @param keyFunction produces the keys of the source elements in the pie chart * @param valueFunction produces the values of the source elements in the pie chart */ public EventListPieDataset(EventList<E> source, FunctionList.Function<E, Comparable<K>> keyFunction, FunctionList.Function<E, Number> valueFunction) { this.groupingList = null; this.sourceList = source; this.keyList = new FunctionList(source, keyFunction); this.valueList = new FunctionList(source, valueFunction); source.addListEventListener(this.datasetEventListener); }
/** * Adapts the given <code>source</code> to the PieDataset interface. The * given <code>keyFunction</code> is then applied to each element of the * <code>source</code> to produce the unique key for the element and the * given <code>valueFunction</code> is applied to produce the value for an * element. * * <p>This constructor should be used when the elements in * <code>source</code> do not need to be grouped together in order to * represent pie data. * * @param source the {@link EventList} containing the data to chart * @param keyFunction produces the keys of the source elements in the pie chart * @param valueFunction produces the values of the source elements in the pie chart */ public EventListPieDataset(EventList<E> source, FunctionList.Function<E, Comparable<K>> keyFunction, FunctionList.Function<E, Number> valueFunction) { this.groupingList = null; this.sourceList = source; this.keyList = new FunctionList(source, keyFunction); this.valueList = new FunctionList(source, valueFunction); source.addListEventListener(this.datasetEventListener); }
/** * Adapts the given <code>source</code> to the PieDataset interface by * applying the <code>groupingComparator</code> to forms groups to be * represented in the pie chart. The given <code>keyFunction</code> is then * applied to produce the key for a group and the given * <code>valueFunction</code> is applied to produce the value for a group. * * @param source the {@link EventList} containing the data to chart * @param groupingComparator produces the groups in the pie chart * @param keyFunction produces the keys of the groups in the pie chart * @param valueFunction produces the values of the groups in the pie chart */ public EventListPieDataset(EventList<E> source, Comparator<E> groupingComparator, FunctionList.Function<List<E>, Comparable<K>> keyFunction, FunctionList.Function<List<E>, Number> valueFunction) { this.groupingList = new GroupingList(source, groupingComparator); this.sourceList = this.groupingList; this.keyList = new FunctionList(this.groupingList, keyFunction); this.valueList = new FunctionList(this.groupingList, valueFunction); this.groupingList.addListEventListener(this.datasetEventListener); }
/** * Adapts the given <code>source</code> to the PieDataset interface by * applying the <code>groupingComparator</code> to forms groups to be * represented in the pie chart. The given <code>keyFunction</code> is then * applied to produce the key for a group and the given * <code>valueFunction</code> is applied to produce the value for a group. * * @param source the {@link EventList} containing the data to chart * @param groupingComparator produces the groups in the pie chart * @param keyFunction produces the keys of the groups in the pie chart * @param valueFunction produces the values of the groups in the pie chart */ public EventListPieDataset(EventList<E> source, Comparator<E> groupingComparator, FunctionList.Function<List<E>, Comparable<K>> keyFunction, FunctionList.Function<List<E>, Number> valueFunction) { this.groupingList = new GroupingList(source, groupingComparator); this.sourceList = this.groupingList; this.keyList = new FunctionList(this.groupingList, keyFunction); this.valueList = new FunctionList(this.groupingList, valueFunction); this.groupingList.addListEventListener(this.datasetEventListener); }
/** * Adapts the given <code>source</code> to the PieDataset interface by * applying the <code>groupingComparator</code> to forms groups to be * represented in the pie chart. The given <code>keyFunction</code> is then * applied to produce the key for a group and the given * <code>valueFunction</code> is applied to produce the value for a group. * * @param source the {@link EventList} containing the data to chart * @param groupingComparator produces the groups in the pie chart * @param keyFunction produces the keys of the groups in the pie chart * @param valueFunction produces the values of the groups in the pie chart */ public EventListPieDataset(EventList<E> source, Comparator<E> groupingComparator, FunctionList.Function<List<E>, Comparable<K>> keyFunction, FunctionList.Function<List<E>, Number> valueFunction) { this.groupingList = new GroupingList(source, groupingComparator); this.sourceList = this.groupingList; this.keyList = new FunctionList(this.groupingList, keyFunction); this.valueList = new FunctionList(this.groupingList, valueFunction); this.groupingList.addListEventListener(this.datasetEventListener); }
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); }
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); }
final FunctionList allColumnValues = new FunctionList<E, Object>(tableData, columnValueFunction);
this.valueList = new FunctionList<List<V>, List<V>>(this.groupingList, new ValueListFunction()); this.valueList.addListEventListener(this);
this.valueList = new FunctionList<List<V>, List<V>>(this.groupingList, new ValueListFunction()); this.valueList.addListEventListener(this);
final FunctionList allColumnValues = new FunctionList<E, Object>(tableData, columnValueFunction);
this.valueList = new FunctionList<List<V>, List<V>>(this.groupingList, new ValueListFunction()); this.valueList.addListEventListener(this);
final FunctionList allColumnValues = new FunctionList<E, Object>(tableData, columnValueFunction);
EventList<SelectableItem<E>> selectableList = new FunctionList<E, SelectableItem<E>>( sourceList, new Item2SelectableFunction<E>(selectionList), new Selectable2ItemFunction<E>());
new ReportGroupIDComparator()); mLatestExecutionReportsList = new FilterList<ReportHolder>( new FunctionList<List<ReportHolder>, ReportHolder>(orderIDList, new LatestExecutionReportFunction()), new NotNullReportMatcher()); mLatestMessageList = new FilterList<ReportHolder>( new FunctionList<List<ReportHolder>, ReportHolder>(orderIDList, new LatestReportFunction()), new NotNullReportMatcher()); mAveragePriceList = new AveragePriceReportList(messageFactory, mAllMessages); mReadOnlyAveragePriceList = GlazedLists.readOnlyList(mAveragePriceList); mOpenOrderList = new FilterList<ReportHolder>(new FunctionList<List<ReportHolder>,ReportHolder>(orderIDList, new OpenOrderListFunction()), new NotNullReportMatcher());
final FunctionList<EventList<PositionRow>, PositionRow> summarized1 = new FunctionList<EventList<PositionRow>, PositionRow>( grouped1, new SummarizeFunction(groupings[0], groupings[1], complement)); final FunctionList<EventList<PositionRow>, PositionRow> summarized2 = new FunctionList<EventList<PositionRow>, PositionRow>( grouped2, new SummarizeFunction(groupings[0], groupings[1])); final FunctionList<EventList<PositionRow>, PositionRow> summarized3 = new FunctionList<EventList<PositionRow>, PositionRow>( grouped3, new SummarizeFunction(groupings[0]));
readLock.lock(); try { FunctionList<ReportHolder, ReportBase> reports = new FunctionList<ReportHolder, ReportBase>( holders, new ReportExtractor()); return createFromReports(reports, incomingPositionSupport,
FilterList<ReportBase> validFills = new FilterList<ReportBase>( reports, new ValidFillsMatcher()); FunctionList<ReportBase, Trade<?>> trades = new FunctionList<ReportBase, Trade<?>>( validFills, new TradeFunction()); return create(trades, incomingPositionSupport, marketDataSupport,