Package de.cuioss.test.generator.domain
Class StreetGenerator
java.lang.Object
de.cuioss.test.generator.domain.StreetGenerator
- All Implemented Interfaces:
TypedGenerator<String>
Generates complete German street addresses by combining street names from
StreetNameGenerator
with random house numbers.
The generator creates addresses in the format: "streetname housenumber"
- Street names are typical German street names (e.g., "Hauptstraße", "Bahnhofstraße")
- House numbers range from 1 to 111
Example usage:
var generator = new StreetGenerator(); String address = generator.next(); // e.g. "Hauptstraße 42"
- Author:
- Oliver Wolff
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
StreetGenerator
public StreetGenerator()
-
-
Method Details
-
next
Description copied from interface:TypedGeneratorGenerates the next instance based on the generator's configuration. Implementations must ensure thread-safety.- Specified by:
nextin interfaceTypedGenerator<String>- Returns:
- A newly created instance. May be null if the generator explicitly supports null value generation.
-
getType
Description copied from interface:TypedGeneratorProvides type information about what kind of objects this generator creates. The default implementation uses the first non-null result fromTypedGenerator.next()to determine the type.Note: If your generator may return null values or the generated type differs from the actual instance type, you should override this method.
- Specified by:
getTypein interfaceTypedGenerator<String>- Returns:
- The class information indicating which type this generator is responsible for.
-