Package net.datafaker.providers.base
Class IdNumber
- Since:
- 0.8.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic final record -
Field Summary
Fields inherited from class net.datafaker.providers.base.AbstractProvider
faker -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioninvalid()Deprecated.Deprecated.Instead of calling this method directly, use faker with locale:Deprecated.Deprecated.Deprecated.Instead of calling this method directly, use faker with locale:peselNumber(LocalDate birthDate, PolishIdNumber.Gender gender) Deprecated.Instead of calling this method directly, use faker with locale and age/gender parameters:ssnValid()valid()valid(IdNumber.IdNumberRequest request) Deprecated.Instead of calling this method directly, use faker with locale:Deprecated.Instead of calling this method directly, use faker with locale:Deprecated.Instead of calling this method directly, use faker with locale:Deprecated.Instead of calling this method directly, use faker with locale:Deprecated.Instead of calling this method directly, use faker with locale:Deprecated.Instead of calling this method directly, use faker with locale:Deprecated.Instead of calling this method directly, use faker with locale:Methods inherited from class net.datafaker.providers.base.AbstractProvider
equals, getFaker, hashCode, loadGenerators, resolve, resolve, toString
-
Constructor Details
-
IdNumber
-
-
Method Details
-
valid
-
invalid
-
valid
-
ssnValid
-
validSvSeSsn
Deprecated.Instead of calling this method directly, use faker with locale:Faker faker = new Faker(new Locale("sv", "SE")); String idNumber = faker.idNumber().valid(); -
invalidSvSeSsn
Deprecated. -
validEnZaSsn
Deprecated.Instead of calling this method directly, use faker with locale:Faker faker = new Faker(new Locale("en", "ZA")); String idNumber = faker.idNumber().valid(); -
inValidEnZaSsn
Deprecated. -
singaporeanFin
-
singaporeanFinBefore2000
-
singaporeanUin
-
singaporeanUinBefore2000
-
validZhCNSsn
Deprecated.Instead of calling this method directly, use faker with locale:Faker faker = new Faker(new Locale("zh", "CN")); String idNumber = faker.idNumber().valid();Generate a valid Chinese id number -
validPtNif
Deprecated.Instead of calling this method directly, use faker with locale:Faker faker = new Faker(new Locale("pt", "PT")); String idNumber = faker.idNumber().valid();Generate a valid Portuguese ID number -
invalidPtNif
Deprecated. -
validEsMXSsn
Deprecated.Instead of calling this method directly, use faker with locale:Faker faker = new Faker(new Locale("es", "MX")); String idNumber = faker.idNumber().valid();- Returns:
- A valid Mexican CURP
-
invalidEsMXSsn
Deprecated.Instead of calling this method directly, use faker with locale:Faker faker = new Faker(new Locale("es", "MX")); String idNumber = faker.idNumber().invalid();- Returns:
- An invalid Mexican CURP
-
peselNumber
Deprecated.Instead of calling this method directly, use faker with locale:Faker faker = new Faker(new Locale("pl", "PL")); String idNumber = faker.idNumber().valid();Generates a valid PESEL number for a person of random gender and age between 0 and 100.- Returns:
- A valid PESEL number
-
peselNumber
Deprecated.Instead of calling this method directly, use faker with locale and age/gender parameters:Faker faker = new Faker(new Locale("pl", "PL")); String idNumber = faker.idNumber().valid(new IdNumberRequest(minAge, maxAge, gender));Generates a valid PESEL number for a person with given gender and birthdate.- Parameters:
birthDate- Given birthdategender- Person's gender. Null value meansPolishIdNumber.Gender.ANY- Returns:
- A valid PESEL number
-
validKoKrRrn
Deprecated.Instead of calling this method directly, use faker with locale:Faker f = new Faker(new Locale("en", "KR")); String rrn = f.idNumber().valid();Generates a valid RRN (Resident Registration Number) for a person of random binary gender and default random age- Returns:
- A valid RRN
- Since:
- 1.8.0
-
validGeIDNumber
Deprecated.Instead of calling this method directly, use faker with locale:Faker f = new Faker(new Locale("en", "GE")); String idNumber = f.idNumber().valid();Generates valid ID number for Georgian citizens and Residents
-