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.


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)
Convenience constructor.

Parameters:
startValue - the start value of the counter.
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.