|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.claritysys.data.AddressGenerator
public class AddressGenerator
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
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 |
---|
public AddressGenerator()
AddressGenerator
.
Method Detail |
---|
public AddressGenerator.Address nextAddress()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |