Class AbstractTensoricCollector<V,​T,​O>

  • Type Parameters:
    V - stream elements
    T - elements of the tensor to be produced
    O - output (e.g. Tensor<T> or Tensorbacked<T>)
    All Implemented Interfaces:
    java.util.stream.Collector<V,​java.util.Map<Position,​T>,​O>
    Direct Known Subclasses:
    TensorbackedCollector, TensorCollector

    public abstract class AbstractTensoricCollector<V,​T,​O>
    extends java.lang.Object
    implements java.util.stream.Collector<V,​java.util.Map<Position,​T>,​O>
    Abstract base class for a stream Collector which is backed by a map of Position to an arbitrary value, from which a Tensor or Tensorbacked can be built in the finalization step.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface java.util.stream.Collector

        java.util.stream.Collector.Characteristics
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractTensoricCollector​(java.util.function.Function<V,​Position> positionMapper, java.util.function.Function<V,​T> valueMapper)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.function.BiConsumer<java.util.Map<Position,​T>,​V> accumulator()  
      java.util.Set<java.util.stream.Collector.Characteristics> characteristics()  
      java.util.function.BinaryOperator<java.util.Map<Position,​T>> combiner()  
      java.util.function.Supplier<java.util.Map<Position,​T>> supplier()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.stream.Collector

        finisher
    • Constructor Detail

      • AbstractTensoricCollector

        public AbstractTensoricCollector​(java.util.function.Function<V,​Position> positionMapper,
                                         java.util.function.Function<V,​T> valueMapper)
    • Method Detail

      • supplier

        public java.util.function.Supplier<java.util.Map<Position,​T>> supplier()
        Specified by:
        supplier in interface java.util.stream.Collector<V,​T,​O>
      • accumulator

        public java.util.function.BiConsumer<java.util.Map<Position,​T>,​V> accumulator()
        Specified by:
        accumulator in interface java.util.stream.Collector<V,​T,​O>
      • combiner

        public java.util.function.BinaryOperator<java.util.Map<Position,​T>> combiner()
        Specified by:
        combiner in interface java.util.stream.Collector<V,​T,​O>
      • characteristics

        public java.util.Set<java.util.stream.Collector.Characteristics> characteristics()
        Specified by:
        characteristics in interface java.util.stream.Collector<V,​T,​O>