// Path: jrand-core/src/main/java/me/xdrop/jrand/Tuple.java
// public class Tuple<K,V> {
//     K key;
//     V val;
// 
//     public Tuple(K key, V val) {
//         this.key = key;
//         this.val = val;
//     }
// 
//     public K getKey() {
//         return key;
//     }
// 
//     public void setKey(K key) {
//         this.key = key;
//     }
// 
//     public V getVal() {
//         return val;
//     }
// 
//     public void setVal(V val) {
//         this.val = val;
//     }
// 
//     public static <K,V> Tuple<K,V> from(K key, V val) {
//         return new Tuple<>(key,val);
//     }
// }
// 
// Path: jrand-core/src/main/java/me/xdrop/jrand/data/AssetMapper.java
// public interface AssetMapper<T> {
//     T map(String element);
// }
// 
// Path: jrand-core/src/main/java/me/xdrop/jrand/data/IndexMapper.java
// public interface IndexMapper<T> {
// 
//     Tuple<String,T> indexedMap(T element);
// }


import me.xdrop.jrand.Tuple;
import me.xdrop.jrand.data.AssetMapper;
import me.xdrop.jrand.data.IndexMapper;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
package me.xdrop.jrand.model.location;



public class CountryMapper implements IndexMapper<Country>, AssetMapper<Country> {
    private Pattern pattern = Pattern.compile("\"\"\"([\\w\\d\\s]+)\"\"\"");

    public Country map(String element) {
        String[] parts = element.split(";");
        boolean fixedCode = false;
        String postalCode = parts[2];
        if (parts[2].startsWith("\"\"\"")) {
            fixedCode = true;
            Matcher matcher = pattern.matcher(parts[2]);
            if (matcher.find()) {
                postalCode = matcher.group(1);
            }
        }

        return new Country(parts[1], parts[0], postalCode, fixedCode);
    }

    @Override
// Path: jrand-core/src/main/java/me/xdrop/jrand/Tuple.java
// public class Tuple<K,V> {
//     K key;
//     V val;
// 
//     public Tuple(K key, V val) {
//         this.key = key;
//         this.val = val;
//     }
// 
//     public K getKey() {
//         return key;
//     }
// 
//     public void setKey(K key) {
//         this.key = key;
//     }
// 
//     public V getVal() {
//         return val;
//     }
// 
//     public void setVal(V val) {
//         this.val = val;
//     }
// 
//     public static <K,V> Tuple<K,V> from(K key, V val) {
//         return new Tuple<>(key,val);
//     }
// }
// 
// Path: jrand-core/src/main/java/me/xdrop/jrand/data/AssetMapper.java
// public interface AssetMapper<T> {
//     T map(String element);
// }
// 
// Path: jrand-core/src/main/java/me/xdrop/jrand/data/IndexMapper.java
// public interface IndexMapper<T> {
// 
//     Tuple<String,T> indexedMap(T element);
// }


// Path: jrand-core/src/main/java/me/xdrop/jrand/model/location/CountryMapper.java
import me.xdrop.jrand.Tuple;
import me.xdrop.jrand.data.AssetMapper;
import me.xdrop.jrand.data.IndexMapper;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

package me.xdrop.jrand.model.location;



public class CountryMapper implements IndexMapper<Country>, AssetMapper<Country> {
    private Pattern pattern = Pattern.compile("\"\"\"([\\w\\d\\s]+)\"\"\"");

    public Country map(String element) {
        String[] parts = element.split(";");
        boolean fixedCode = false;
        String postalCode = parts[2];
        if (parts[2].startsWith("\"\"\"")) {
            fixedCode = true;
            Matcher matcher = pattern.matcher(parts[2]);
            if (matcher.find()) {
                postalCode = matcher.group(1);
            }
        }

        return new Country(parts[1], parts[0], postalCode, fixedCode);
    }

    @Override
    public Tuple<String, Country> indexedMap(Country element) {