proper.util
Class TemporaryName

java.lang.Object
  extended by proper.util.TemporaryName

public class TemporaryName
extends java.lang.Object

This class creates temporary names from a given prefix, basically adding numbers to the end and incrementing them.

Version:
$Revision: 1.3 $
Author:
FracPete

Constructor Summary
TemporaryName(java.lang.String prefix)
          initizializes the generator with alphanumeric generation
TemporaryName(java.lang.String prefix, boolean alphanum)
          initizializes the generator
 
Method Summary
 boolean getAlphaNumeric()
          returns whether alphanumeric suffices are generated or not
 java.lang.String getCurrent()
          returns the current temporary name
 java.lang.String getPrefix()
          returns the prefix for creating temporary names
 java.lang.String next()
          returns the next temporary name
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemporaryName

public TemporaryName(java.lang.String prefix)
initizializes the generator with alphanumeric generation

Parameters:
prefix - the prefix to work with

TemporaryName

public TemporaryName(java.lang.String prefix,
                     boolean alphanum)
initizializes the generator

Parameters:
prefix - the prefix to work with
alphanum - if TRUE generates 0-9 and then A-Z suffices, if FALSE then only numeric ones
Method Detail

getPrefix

public java.lang.String getPrefix()
returns the prefix for creating temporary names


getAlphaNumeric

public boolean getAlphaNumeric()
returns whether alphanumeric suffices are generated or not


getCurrent

public java.lang.String getCurrent()
returns the current temporary name


next

public java.lang.String next()
returns the next temporary name