All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.catools.common.facker.provider.CFakerStreetAddressProvider Maven / Gradle / Ivy

There is a newer version: 0.1.25
Show newest version
package org.catools.common.facker.provider;

import com.mifmif.common.regex.Generex;
import lombok.AllArgsConstructor;
import org.catools.common.collections.CList;
import org.catools.common.facker.model.CRandomStreetInfo;

@AllArgsConstructor
public class CFakerStreetAddressProvider {
    private final CList streetNames;
    private final CList streetSuffixes;
    private final CList streetPrefixes;
    private final CList streetNumberPatterns;
    private final CList buildingNumberPatterns;

    public CRandomStreetInfo getAny() {
        return new CRandomStreetInfo(streetNames.getAny(),
                streetSuffixes.getAny(),
                streetPrefixes.getAny(),
                new Generex(streetNumberPatterns.getAny()).random(),
                new Generex(buildingNumberPatterns.getAny()).random());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy