org.schmant.support
Class IncrementingFutureEntityFactory

java.lang.Object
  extended by org.schmant.support.IncrementingFutureEntityFactory
All Implemented Interfaces:
FutureEntityFactory

public class IncrementingFutureEntityFactory
extends Object
implements FutureEntityFactory

This factory creates FutureEntity objects with an incrementing index number.

Since:
0.5
Author:
Karl Gustafsson

Constructor Summary
IncrementingFutureEntityFactory(DirectoryView d, String prefix, String suffix)
          Create FutureEntity:s in the supplied directory.
IncrementingFutureEntityFactory(DirectoryView d, String prefix, String suffix, int startNo)
          Create FutureEntity:s in the supplied directory.
 
Method Summary
 FutureEntity create()
          Create a new future entity and increment the internal index number.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IncrementingFutureEntityFactory

public IncrementingFutureEntityFactory(DirectoryView d,
                                       String prefix,
                                       String suffix,
                                       int startNo)
Create FutureEntity:s in the supplied directory. The future entities will have the supplied name prefix and suffixes and incrementing index number, starting with the supplied number.

Parameters:
d - The directory to create future entities in.
prefix - The entity name prefix.
suffix - The entity name suffix.
startNo - The start value of the index number.

IncrementingFutureEntityFactory

public IncrementingFutureEntityFactory(DirectoryView d,
                                       String prefix,
                                       String suffix)
Create FutureEntity:s in the supplied directory. The future entities will have the supplied name prefix and suffixes and incrementing index number, starting with 0.

Parameters:
d - The directory to create future entities in.
prefix - The entity name prefix.
suffix - The entity name suffix.
Method Detail

create

public FutureEntity create()
Create a new future entity and increment the internal index number.

Specified by:
create in interface FutureEntityFactory
Returns:
A new future entity.