Class Util.Triplewise<T>

java.lang.Object
eu.bandm.tscore.base.Util.Triplewise<T>
Enclosing class:
Util

public abstract static class Util.Triplewise<T> extends Object
Visitor which performs the method action(Object,Object,Object) for triples of adjacent elements of an Iterable. The references wander through the positions, from the third to the first. The schema for a four element list is as follows:
      null null #0
      null #0   #1
      #0   #1   #2
      #1   #2   #3
      #2   #3   null
      #3   null null
  
DISLOC should be moved to metatools/ops/Iterators or metatools/util !?!?
  • Field Details

    • it

      protected final Iterator<T> it
    • t

      protected T t
    • last

      protected T last
    • lastlast

      protected T lastlast
  • Constructor Details

    • Triplewise

      public Triplewise(Iterable<T> it)
    • Triplewise

      public Triplewise(Iterator<T> it)
  • Method Details

    • action

      public abstract void action(@Opt T left, @Opt T middle, @Opt T right)
    • visit

      public void visit()