Class AbstractValueIncrementor<T>

java.lang.Object
nl._42.beanie.generator.increment.AbstractValueIncrementor<T>
All Implemented Interfaces:
ValueGenerator
Direct Known Subclasses:
IntegerValueIncrementor

public abstract class AbstractValueIncrementor<T> extends Object implements ValueGenerator
Value generator capable of incrementing itself.
Since:
Apr 11, 2014
Author:
Jeroen van Schagen
  • Constructor Details

    • AbstractValueIncrementor

      public AbstractValueIncrementor(T initial)
  • Method Details

    • generate

      public Object generate(Class<?> type)
      Description copied from interface: ValueGenerator
      Generate a new value of the specified type.
      Specified by:
      generate in interface ValueGenerator
      Parameters:
      type - the type of value
      Returns:
      the generation value
    • increment

      protected abstract T increment(T current)