Package de.alpharogroup.random.address
Class RandomAddressExtensions
- java.lang.Object
-
- de.alpharogroup.random.address.RandomAddressExtensions
-
public final class RandomAddressExtensions extends java.lang.ObjectThe classRandomAddressExtensionsis a utility class to create random addresses.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPROP_FILE_STREETSResource for get german streets.static java.lang.StringPROP_FILE_ZIP_CITIESResource for get german zipcodes and the cities from it.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringgetRandomStreet(java.util.Properties properties)Returns a random german street.static java.lang.StringgetRandomStreetWithNumber(java.util.Properties properties)Gets a random german street with a random number.static java.lang.StringgetRandomZip(java.util.Properties properties)Gets a random zip from the Properties.
-
-
-
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
-
-
Method Detail
-
getRandomStreet
public static java.lang.String getRandomStreet(java.util.Properties properties) throws java.io.IOExceptionReturns a random german street.- Parameters:
properties- The properties file with the streets.- Returns:
- A random german street.
- Throws:
java.io.IOException- Signals that an I/O exception has occurred.
-
getRandomStreetWithNumber
public static java.lang.String getRandomStreetWithNumber(java.util.Properties properties) throws java.io.IOExceptionGets a random german street with a random number.- Parameters:
properties- The properties file with the streets.- Returns:
- Returns a random german street with a random number.
- Throws:
java.io.IOException- Signals that an I/O exception has occurred.
-
getRandomZip
public static java.lang.String getRandomZip(java.util.Properties properties)
Gets a random zip from the Properties.- Parameters:
properties- The Properties.- Returns:
- Returns a random zip.
-
-