001/* 002 * Copyright © 2025 CUI-OpenSource-Software (info@cuioss.de) 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package de.cuioss.test.generator.domain; 017 018import de.cuioss.test.generator.internal.net.java.quickcheck.Generator; 019import lombok.experimental.UtilityClass; 020 021import java.util.List; 022import java.util.stream.Stream; 023 024/** 025 * Provides lists of names for creating name {@link Generator}. 026 * 027 * @author Oliver Wolff 028 * 029 */ 030@UtilityClass 031@SuppressWarnings("squid:S2386") // owolff: False positive, list are immutable 032public final class NameLibrary { 033 034 // German 035 /** Top 10 male name in Germany 2014 */ 036 public static final List<String> FIRSTNAMES_MALE_GERMAN = List.of("Ben", "Elias", "Fynn", "Jonas", "Leon", 037 "Louis", "Luca", "Lukas", "Noah", "Paul"); 038 039 /** Top 10 female name in Germany 2014 */ 040 public static final List<String> FIRSTNAMES_FEMALE_GERMAN = List.of("Anna", "Emilia", "Emma", "Hannah", "Lea", 041 "Lena", "Leonie", "Marie", "Mia", "Sophia"); 042 043 /** 044 * The intersection of {@link #FIRSTNAMES_FEMALE_GERMAN} and 045 * {@link #FIRSTNAMES_MALE_GERMAN}. 046 */ 047 public static final List<String> FIRSTNAMES_ANY_GERMAN = 048 Stream.concat(FIRSTNAMES_FEMALE_GERMAN.stream(), FIRSTNAMES_MALE_GERMAN.stream()).toList(); 049 050 /** Top 10 names in Wikipedia */ 051 public static final List<String> LAST_NAMES_GERMAN = List.of("Müller", "Schmidt", "Schneider", "Fischer", 052 "Weber", "Meyer", "Wagner", "Becker", "Schulz", "Hoffmann"); 053 054 // English 055 056 /** Top 10 male name in Germany 2014 */ 057 public static final List<String> FIRSTNAMES_MALE_ENGLISH = List.of("Jackson", "Aiden", "Liam", "Lucas", 058 "Noah", "Mason", "Ethan", "Caden", "Jacob", "Logan"); 059 060 /** Top 10 female name in Germany 2014 */ 061 public static final List<String> FIRSTNAMES_FEMALE_ENGLISH = List.of("Sophia", "Emma", "Olivia", "Ava", 062 "Isabella", "Mia", "Zoe", "Lily", "Emily", "Madelyn"); 063 064 /** 065 * The intersection of {@link #FIRSTNAMES_MALE_ENGLISH} and 066 * {@link #FIRSTNAMES_FEMALE_ENGLISH}. 067 */ 068 public static final List<String> FIRSTNAMES_ANY_ENGLISH = 069 Stream.concat(FIRSTNAMES_FEMALE_ENGLISH.stream(), FIRSTNAMES_MALE_ENGLISH.stream()).toList(); 070 071 /** Top 10 names from U.S. Census Bureau */ 072 public static final List<String> LAST_NAMES_ENGLISH = List.of("Smith", "Johnson", "Williams", "Brown", 073 "Jones", "Miller", "Davis", "Garcia", "Rodriguez", "Wilson"); 074}