com.claritysys.data
Class AddressGenerator

java.lang.Object
  extended by com.claritysys.data.AddressGenerator

public class AddressGenerator
extends java.lang.Object

Class to generate random mailing addresses. They do not include city, state, zip, or country - just the address line 1 data.

To use it, create an instance of AddressGenerator then make as many calls to nextAddress() as you need.

Example:

  AddressGenerator addrGen = new AddressGenerator ();
  String address = addrGen.nextAddress ();
 

Here are ten sample addresses the above code might generate:

   55401 E DARLA FWY APT 209
   74311 VERDE VIS
   98121 SAINT THOMAS PKWY LOT 316
   98641 NE VIA DE LUCCIA VIS
   51571 RIO CT SPC 458
   3881 ADCOX CTR LOT V
   52661 SE NAVARRE CIR
   1201 OCEAN TPKE
   68881 OCEAN TRL
   15281 E POPPY CYN
 

Version:
$Revision: 2363 $

Nested Class Summary
static class AddressGenerator.Address
          A single generated name with its component parts.
static class AddressGenerator.Test
          An inner class for testing, can be run from command line to see sample output.
 
Constructor Summary
AddressGenerator()
          Create a new AddressGenerator.
 
Method Summary
 AddressGenerator.Address nextAddress()
          Return the next random street address.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AddressGenerator

public AddressGenerator()
Create a new AddressGenerator.

Method Detail

nextAddress

public AddressGenerator.Address nextAddress()
Return the next random street address.

Returns:
the next random street address.


Copyright ? 2002 Clarity Systems Group, LLC. All Rights Reserved.