de.smartics.exceptions.id
Class SignedIncrementFactory

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

public class SignedIncrementFactory
     
     
extends Object
implements IdFactory

The factory that created ExceptionIds that provides a long number Counting starts per default at 1, continues to Integer.MAX_VALUE, to the negatives, ends with zero and starts at 1 (without a warning) again.

Author:
Robert Reiner

Constructor Summary
SignedIncrementFactory()
          Default constructor with counter initialized with 1.
SignedIncrementFactory(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

SignedIncrementFactory

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


SignedIncrementFactory

public SignedIncrementFactory(long startValue)
                       throws IllegalArgumentException
Convenience constructor.

Parameters:
startValue - the start value of the counter.
Throws:
IllegalArgumentException
Method Detail

createId

public LongExceptionId createId()
Creates the identifier.

Specified by:
createId in interface IdFactory
Returns:
the created identifier.
See Also:
IdFactory.createId()


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