@@ -0,0 +1,1484 @@
+package com.rolfje.anonimatron.anonymizer;%0A%0Aimport com.rolfje.anonimatron.synonyms.StringSynonym;%0Aimport com.rolfje.anonimatron.synonyms.Synonym;%0A%0Aimport java.util.Random;%0A%0A/**%0A * Generates format valid Uk Post codes.%0A * See https://en.wikipedia.org/wiki/Postcodes_in_the_United_Kingdom%0A */%0Apublic class UkPostCodeAnonymizer implements Anonymizer %7B%0A    private Random random = new Random();%0A%0A    private static String CHARACTERS = %22ABCDEFGHIJKLMNOPQRSTUVWXYZ%22;%0A    private static String DIGITS = %220123456789%22;%0A%0A    @Override%0A    public String getType() %7B%0A        return %22UK_POST_CODE%22;%0A    %7D%0A%0A    @Override%0A    public Synonym anonymize(Object from, int size, boolean shortlived) %7B%0A        String result = buildZipCode();%0A        StringSynonym s = new StringSynonym();%0A        s.setFrom((String) from);%0A        s.setTo((String) result);%0A        return s;%0A    %7D%0A%0A    String buildZipCode() %7B%0A%0A        String area = %22%22 + getRandomCharacter(CHARACTERS) + getRandomCharacter(CHARACTERS);%0A%0A        // Not implemented: The one digit districts%0A        String district = %22%22 + getRandomCharacter(DIGITS) + getRandomCharacter(CHARACTERS + DIGITS);%0A%0A        String sector = %22%22 + getRandomCharacter(DIGITS);%0A        String unit = %22%22 + getRandomCharacter(CHARACTERS) + getRandomCharacter(CHARACTERS);%0A%0A        return area + district + %22 %22 + sector + unit;%0A    %7D%0A%0A    private char getRandomCharacter(String characters) %7B%0A        return characters.charAt(random.nextInt(characters.length()));%0A    %7D%0A%7D%0A

Add uk postal codes