Class Anonymizer.ItalianFiscalCodeAnonymizer

Enclosing class:
Anonymizer

public class Anonymizer.ItalianFiscalCodeAnonymizer extends Anonymizer.AbstractAnonymizer<String,Anonymizer.ItalianFiscalCodeAnonymizer>
Anonymizer used to obfuscate a fields containing user's fiscal code value. If the context doesn't contains the field assigned to this instance, all'the method of this class will not change the context.
  • Constructor Details

    • ItalianFiscalCodeAnonymizer

      protected ItalianFiscalCodeAnonymizer(String field)
  • Method Details

    • anonymize

      public Anonymizer.ItalianFiscalCodeAnonymizer anonymize(String surnameField, String nameField, String birthdayField, String birthplaceField, String genderField)
      Generate the italian fiscal code based on the user's information given as parameters. We suppose that the input values, have been already anonymized.
      Parameters:
      surnameField - field containing the surname's value
      nameField - field containing the name's value
      birthdayField - field containing the birthdaty's value
      birthplaceField - field containing the birthplace's value
      genderField - field containing the gender's value
      Returns:
      a reference of this object.
    • validate

      protected void validate(String value)
      Overrides:
      validate in class Anonymizer.AbstractAnonymizer<String,Anonymizer.ItalianFiscalCodeAnonymizer>
    • getRandomDate

      protected Date getRandomDate()
    • getRandomCity

      protected String getRandomCity()
    • getRandomText

      protected String getRandomText()
    • getRandomGender

      protected String getRandomGender()