Class Aggregators.MinMaxConsumer<V extends java.lang.Comparable<V>>

    • Field Detail

      • max

        private final boolean max
      • value

        private V extends java.lang.Comparable<V> value
      • item

        private IItem item
    • Constructor Detail

      • MinMaxConsumer

        public MinMaxConsumer​(IMemberAccessor<? extends V,​IItem> accessor,
                              boolean max)
    • Method Detail

      • consume

        public void consume​(IItem item)
        Description copied from interface: IItemConsumer
        Consumes another item.
        Specified by:
        consume in interface IItemConsumer<V extends java.lang.Comparable<V>>
      • add

        private void add​(V newValue,
                         IItem newItem)
      • merge

        public Aggregators.MinMaxConsumer<V> merge​(Aggregators.MinMaxConsumer<V> other)
        Description copied from interface: IItemConsumer
        Merges this object with the supplied object. Normally this is another item consumer of the same type and the output result is a consumer with an internal state that reflects the state of both the current consumer and the input value.
        Specified by:
        merge in interface IItemConsumer<V extends java.lang.Comparable<V>>
        Parameters:
        other - another instance to merge with
        Returns:
        the merged instance