net.sourceforge.jaulp.random.address
Class RandomAddressUtils

java.lang.Object
  extended by net.sourceforge.jaulp.random.address.RandomAddressUtils

public class RandomAddressUtils
extends java.lang.Object

Utility class to create random addresses.

Version:
1.0
Author:
Asterios Raptis

Field Summary
static java.lang.String PROP_FILE_STREETS
          Resource for get german streets.
static java.lang.String PROP_FILE_ZIP_CITIES
          Resource for get german zipcodes and the cities from it.
 
Constructor Summary
RandomAddressUtils()
           
 
Method Summary
static java.lang.String getRandomStreet(java.util.Properties properties)
          Returns a random german street.
static java.lang.String getRandomStreetWithNumber(java.util.Properties properties)
          Gets a random german street with a random number.
static java.lang.String getRandomZip(java.util.Properties p)
          Gets a random zip from the Properties.
static java.lang.String getRandomZipAndCity(java.util.Properties properties)
          Gets a random zip and the corresponding city from the Properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_FILE_STREETS

public static final java.lang.String PROP_FILE_STREETS
Resource for get german streets.

See Also:
Constant Field Values

PROP_FILE_ZIP_CITIES

public static final java.lang.String PROP_FILE_ZIP_CITIES
Resource for get german zipcodes and the cities from it.

See Also:
Constant Field Values
Constructor Detail

RandomAddressUtils

public RandomAddressUtils()
Method Detail

getRandomStreet

public static java.lang.String getRandomStreet(java.util.Properties properties)
Returns a random german street.

Returns:
A random german street.

getRandomStreetWithNumber

public static java.lang.String getRandomStreetWithNumber(java.util.Properties properties)
Gets a random german street with a random number.

Returns:
Returns a random german street with a random number.

getRandomZip

public static java.lang.String getRandomZip(java.util.Properties p)
Gets a random zip from the Properties.

Parameters:
p - The Properties.
Returns:
Returns a random zip.

getRandomZipAndCity

public static java.lang.String getRandomZipAndCity(java.util.Properties properties)
Gets a random zip and the corresponding city from the Properties.

Parameters:
properties - The Properties.
Returns:
Returns a random zip and the corresponding city from the Properties.


Copyright © 2010. All Rights Reserved.