All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sf.javagimmicks.collections8.transformer.BidiTransformingRingCursor Maven / Gradle / Ivy

There is a newer version: 0.99-alpha1
Show newest version
package net.sf.javagimmicks.collections8.transformer;

import net.sf.javagimmicks.collections8.RingCursor;
import net.sf.javagimmicks.transform8.BidiFunction;
import net.sf.javagimmicks.transform8.BidiTransforming;

class BidiTransformingRingCursor
   extends TransformingRingCursor
   implements BidiTransforming
{
   BidiTransformingRingCursor(RingCursor ringCursor, BidiFunction transformer)
   {
      super(ringCursor, transformer);
   }
   
   public BidiFunction getTransformerBidiFunction()
   {
      return (BidiFunction)getTransformerFunction();
   }

   @Override
   public void insertAfter(T value)
   {
      _internalRingCursor.insertAfter(getTransformerBidiFunction().applyReverse(value));
   }

   @Override
   public void insertBefore(T value)
   {
      _internalRingCursor.insertBefore(getTransformerBidiFunction().applyReverse(value));
   }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy