Class SingleEntryItemCollection

    • Constructor Detail

      • SingleEntryItemCollection

        SingleEntryItemCollection​(IItem item,
                                  java.util.Set<IRange<IQuantity>> chunkRanges)
    • Method Detail

      • iterator

        public java.util.Iterator<IItemIterable> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<IItemIterable>
      • apply

        public IItemCollection apply​(IItemFilter filter)
        Description copied from interface: IItemCollection
        Creates a new item collection with all items in this collection that pass through the filter. The collection may be eagerly or lazily evaluated.
        Specified by:
        apply in interface IItemCollection
        Parameters:
        filter - the filter to use when selecting items for the new collection
        Returns:
        a new collection of items
      • getAggregate

        public <V,​C extends IItemConsumer<C>> V getAggregate​(IAggregator<V,​C> aggregator)
        Description copied from interface: IItemCollection
        Calculates an aggregated value for the items in this collection.
        Specified by:
        getAggregate in interface IItemCollection
        Type Parameters:
        V - aggregate result value type
        C - Item consumer type. See IAggregator.
        Returns:
        the aggregated value
      • hasItems

        public boolean hasItems()
        Specified by:
        hasItems in interface IItemCollection
        Returns:
        true if the collections contains items, false otherwise
      • getTimeRanges

        public java.util.Set<IRange<IQuantity>> getTimeRanges()
        Description copied from interface: IItemCollection
        Returns a set of IRange representations of the time ranges represented by this item collection. This set is not affected by any filtering operations on the item collection since its use is to show the time ranges in which events could possibly have been occurred.
        Specified by:
        getTimeRanges in interface IItemCollection
        Returns:
        a set of IRange objects representing the time ranges of represented by this IItemCollection