de.smartics.exceptions.id
Class IncrementFactory

Package class diagram package IncrementFactory
java.lang.Object
  extended by de.smartics.exceptions.id.IncrementFactory
All Implemented Interfaces:
IdFactory

public class IncrementFactory
     
     
extends Object
implements IdFactory

The factory that created ExceptionIds that provides a number that is larger than zero. If the last number has been provided, it continues with 1, issuing a message on info level.


Constructor Summary
IncrementFactory()
          Default constructor with counter initialized with 1.
IncrementFactory(long startValue)
          Convenience constructor.
 
Method Summary
 LongExceptionId createId()
          Creates the identifier.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IncrementFactory

public IncrementFactory()
Default constructor with counter initialized with 1.


IncrementFactory

public IncrementFactory(long startValue)
                 throws IllegalArgumentException
Convenience constructor.

Parameters:
startValue - the start value of the counter.
Throws:
IllegalArgumentException - if the start value is smaller than or equal to zero.
Method Detail

createId

public LongExceptionId createId()
Description copied from interface: IdFactory
Creates the identifier.

Specified by:
createId in interface IdFactory
Returns:
the created identifier.


Copyright © 2007-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.