Class AccStaticMultiplex<B,E,K,U,V>

java.lang.Object
org.aksw.jenax.arq.aggregation.AccStaticMultiplex<B,E,K,U,V>
Type Parameters:
K -
V -
All Implemented Interfaces:
org.aksw.commons.collector.domain.Accumulator<B,E,Map<K,V>>

public class AccStaticMultiplex<B,E,K,U,V> extends Object implements org.aksw.commons.collector.domain.Accumulator<B,E,Map<K,V>>
An ggregator that initialized with a static map<Key, Aggregator<...> Every key in the map is passed to a function that yields the value to be passed as the new binding to the child accumulator. Hence, this accumulator is 'map'-centric as its the map's keys that drive the lookup TODO Clarify relation between AggObject, AggMap and AggStaticMultiplex
Author:
raven
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected BiFunction<B,K,? extends U>
    Obtain the childBinding based on the current binding and the current key of the map
    protected Map<K,org.aksw.commons.collector.domain.Accumulator<U,E,V>>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    AccStaticMultiplex(BiFunction<B,K,? extends U> childBinding, Map<K,org.aksw.commons.collector.domain.Accumulator<U,E,V>> keyToSubAcc)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    accumulate(B binding, E env)
     
    static <B, E, K, U, V>
    org.aksw.commons.collector.domain.Accumulator<B,E,Map<K,V>>
    create(BiFunction<B,K,? extends U> childBinding, Map<K,org.aksw.commons.collector.domain.Accumulator<U,E,V>> keyToSubAcc)
     
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.aksw.commons.collector.domain.Accumulator

    accumulate
  • Field Details

    • childBinding

      protected BiFunction<B,K,? extends U> childBinding
      Obtain the childBinding based on the current binding and the current key of the map
    • keyToSubAcc

      protected Map<K,org.aksw.commons.collector.domain.Accumulator<U,E,V>> keyToSubAcc
  • Constructor Details

    • AccStaticMultiplex

      public AccStaticMultiplex(BiFunction<B,K,? extends U> childBinding, Map<K,org.aksw.commons.collector.domain.Accumulator<U,E,V>> keyToSubAcc)
  • Method Details

    • accumulate

      public void accumulate(B binding, E env)
      Specified by:
      accumulate in interface org.aksw.commons.collector.domain.Accumulator<B,E,K>
    • getValue

      public Map<K,V> getValue()
      Specified by:
      getValue in interface org.aksw.commons.collector.domain.Accumulator<B,E,K>
    • create

      public static <B, E, K, U, V> org.aksw.commons.collector.domain.Accumulator<B,E,Map<K,V>> create(BiFunction<B,K,? extends U> childBinding, Map<K,org.aksw.commons.collector.domain.Accumulator<U,E,V>> keyToSubAcc)