public class RandomStreetSet
extends java.lang.Object
Copyright (C) 2015 JIOWA Business Solutions GmbH, Bettinastr. 30 , D-60325 Frankfurt am Main, Germany
Homepage: www.jiowa.de
All rights reserved.
Download: www.jiowa.de/download.html
License: www.jiowa.de/license.html
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
countryCode
country code for this set of streets
|
protected java.util.Random |
houseRandom
house number randomizer
|
protected java.util.ArrayList<java.lang.String> |
list
list of street names
|
protected java.util.Random |
postCodeRandom
post code randomizer
|
protected java.util.Random |
streetRandom
street name randomizer
|
Constructor and Description |
---|
RandomStreetSet(java.lang.String countryCode,
java.util.List<java.lang.String> listOfLines)
Set of streets to be used for random selection.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCountryCode() |
Street |
getRandom()
Returns a random street according to the country code.
|
protected void |
initialize(java.lang.String countryCode,
java.util.List<java.lang.String> listOfLines)
Initializes the street names according to country code.
|
protected java.util.Random streetRandom
protected java.util.Random houseRandom
protected java.util.Random postCodeRandom
protected java.lang.String countryCode
protected java.util.ArrayList<java.lang.String> list
public RandomStreetSet(java.lang.String countryCode, java.util.List<java.lang.String> listOfLines)
countryCode
- the country codelistOfLines
- list of lines containing a street namepublic Street getRandom()
Street
public java.lang.String getCountryCode()
protected void initialize(java.lang.String countryCode, java.util.List<java.lang.String> listOfLines)
countryCode
- the country code from which the list of streets is takenlistOfLines
- list of lines with a street name each.