FileDocCategorySizeDatePackage
IdentifierExample.javaAPI DocExample2069Wed May 18 09:39:00 BST 2005com.discursive.jccook.lang.id

IdentifierExample

public class IdentifierExample extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)


		IdentifierGeneratorFactory factory =
			IdentifierGeneratorFactory.newInstance();
		
		LongIdentifierGenerator idGenerator = factory.longGenerator(false, 0);
		System.out.println( idGenerator.nextLongIdentifier() );
		System.out.println( idGenerator.nextLongIdentifier() );
		System.out.println( idGenerator.nextLongIdentifier() );
		System.out.println( idGenerator.nextLongIdentifier() );
		System.out.println( idGenerator.nextLongIdentifier() );
		
		StringIdentifierGenerator alphaNumericGenerator = factory.alphanumericGenerator(false, 4);
		System.out.println( alphaNumericGenerator.nextStringIdentifier() );
		System.out.println( alphaNumericGenerator.nextStringIdentifier() );
		System.out.println( alphaNumericGenerator.nextStringIdentifier() );
		System.out.println( alphaNumericGenerator.nextStringIdentifier() );
		System.out.println( alphaNumericGenerator.nextStringIdentifier() );
		System.out.println( alphaNumericGenerator.nextStringIdentifier() );