// Path: src/main/java/com/rolfje/anonimatron/synonyms/StringSynonym.java
// public class StringSynonym implements Synonym {
//     private String type;
//     private String from;
//     private String to;
//     private boolean shortlived = false;
// 
//     public StringSynonym() {
//     }
// 
//     public StringSynonym(String type, String from, String to, boolean shortlived) {
//         this.type = type;
//         this.from = from;
//         this.to = to;
//         this.shortlived = shortlived;
//     }
// 
//     @Override
//     public String getType() {
//         return type;
//     }
// 
//     @Override
//     public Object getFrom() {
//         return from;
//     }
// 
//     @Override
//     public Object getTo() {
//         return to;
//     }
// 
//     public void setType(String type) {
//         this.type = type;
//     }
// 
//     public void setFrom(String from) {
//         this.from = from;
//     }
// 
//     public void setTo(String to) {
//         this.to = to;
//     }
// 
//     public void setShortlived(boolean shortlived) {
//         this.shortlived = shortlived;
//     }
// 
//     @Override
//     public boolean isShortLived() {
//         return shortlived;
//     }
// 
//     @Override
//     public boolean equals(Object obj) {
//         return (obj != null) && (this.getClass() == obj.getClass()) && (this.hashCode() == obj.hashCode());
//     }
// 
//     @Override
//     public int hashCode() {
//         return from.hashCode() + to.hashCode() + type.hashCode();
//     }
// }
// 
// Path: src/main/java/com/rolfje/anonimatron/synonyms/Synonym.java
// public interface Synonym {
// 
// 	/**
// 	 * Indicates if this Synonym is short-lived or transient, meaning that
//      * it should not be stored in the synonyms file. Transient Synonyms
//      * are not stored, need to be calculated each run time.
// 	 *
// 	 * Transient synonyms are:
// 	 *
// 	 * <ol>
// 	 *     <li>Not stored in memory.</li>
// 	 *     <li>Not stored in the synonym file.</li>
// 	 * </ol>
// 	 *
// 	 * @return <code>true</code> if the synonym should be thrown away
// 	 * after use (not stored in the synonym file).
// 	 */
// 	boolean isShortLived();
// 
// 	/**
// 	 * @return The semantic data type of this Synonym, usually something
// 	 *         descriptive as "NAME" or "STREET".
// 	 */
// 	String getType();
// 
// 	/**
// 	 * @return The data which was in the original database for this Synonym
// 	 */
// 	Object getFrom();
// 
// 	/**
// 	 * 
// 	 * @return The data with which the original data in the database will be or
// 	 *         is replaced when the Anonymizer runs.
// 	 */
// 	Object getTo();
// }


import com.rolfje.anonimatron.synonyms.StringSynonym;
import com.rolfje.anonimatron.synonyms.Synonym;
import java.util.Map;
                getType(),
                (String) from,
                to,
                shortlived
        );
    }

    /**
     * Anonymizes a string with digits into a new string of digits where only a part
     * of the original digits are changed. You can use this to mask out a certain part
     * of the original string, like an area code of a phone number, or the bank number
     * of a credit card number.
     * <p>
     * A mask looks like "111***", where digits remain original, and stars (or other
     * characters) are replaced with random digits. An example:
     * <p>
     * Original number: 555-1234
     * Mask:            1111**** (note that the '-' is also untouched by placing a digit there)
     * New number     : 555-9876
     * <p>
     * Note that if the mask is shorter than the input string, the output string will
     * have random digits where there is no mask. In short: only the locations where
     * there is a digit in the mask are left untouched and will be in the output.
     *
     * @param from
     * @param size
     * @param shortlived
     * @param mask
     * @return
     */
// Path: src/main/java/com/rolfje/anonimatron/synonyms/StringSynonym.java
// public class StringSynonym implements Synonym {
//     private String type;
//     private String from;
//     private String to;
//     private boolean shortlived = false;
// 
//     public StringSynonym() {
//     }
// 
//     public StringSynonym(String type, String from, String to, boolean shortlived) {
//         this.type = type;
//         this.from = from;
//         this.to = to;
//         this.shortlived = shortlived;
//     }
// 
//     @Override
//     public String getType() {
//         return type;
//     }
// 
//     @Override
//     public Object getFrom() {
//         return from;
//     }
// 
//     @Override
//     public Object getTo() {
//         return to;
//     }
// 
//     public void setType(String type) {
//         this.type = type;
//     }
// 
//     public void setFrom(String from) {
//         this.from = from;
//     }
// 
//     public void setTo(String to) {
//         this.to = to;
//     }
// 
//     public void setShortlived(boolean shortlived) {
//         this.shortlived = shortlived;
//     }
// 
//     @Override
//     public boolean isShortLived() {
//         return shortlived;
//     }
// 
//     @Override
//     public boolean equals(Object obj) {
//         return (obj != null) && (this.getClass() == obj.getClass()) && (this.hashCode() == obj.hashCode());
//     }
// 
//     @Override
//     public int hashCode() {
//         return from.hashCode() + to.hashCode() + type.hashCode();
//     }
// }
// 
// Path: src/main/java/com/rolfje/anonimatron/synonyms/Synonym.java
// public interface Synonym {
// 
// 	/**
// 	 * Indicates if this Synonym is short-lived or transient, meaning that
//      * it should not be stored in the synonyms file. Transient Synonyms
//      * are not stored, need to be calculated each run time.
// 	 *
// 	 * Transient synonyms are:
// 	 *
// 	 * <ol>
// 	 *     <li>Not stored in memory.</li>
// 	 *     <li>Not stored in the synonym file.</li>
// 	 * </ol>
// 	 *
// 	 * @return <code>true</code> if the synonym should be thrown away
// 	 * after use (not stored in the synonym file).
// 	 */
// 	boolean isShortLived();
// 
// 	/**
// 	 * @return The semantic data type of this Synonym, usually something
// 	 *         descriptive as "NAME" or "STREET".
// 	 */
// 	String getType();
// 
// 	/**
// 	 * @return The data which was in the original database for this Synonym
// 	 */
// 	Object getFrom();
// 
// 	/**
// 	 * 
// 	 * @return The data with which the original data in the database will be or
// 	 *         is replaced when the Anonymizer runs.
// 	 */
// 	Object getTo();
// }


// Path: src/main/java/com/rolfje/anonimatron/anonymizer/DigitStringAnonymizer.java
import com.rolfje.anonimatron.synonyms.StringSynonym;
import com.rolfje.anonimatron.synonyms.Synonym;
import java.util.Map;

                getType(),
                (String) from,
                to,
                shortlived
        );
    }

    /**
     * Anonymizes a string with digits into a new string of digits where only a part
     * of the original digits are changed. You can use this to mask out a certain part
     * of the original string, like an area code of a phone number, or the bank number
     * of a credit card number.
     * <p>
     * A mask looks like "111***", where digits remain original, and stars (or other
     * characters) are replaced with random digits. An example:
     * <p>
     * Original number: 555-1234
     * Mask:            1111**** (note that the '-' is also untouched by placing a digit there)
     * New number     : 555-9876
     * <p>
     * Note that if the mask is shorter than the input string, the output string will
     * have random digits where there is no mask. In short: only the locations where
     * there is a digit in the mask are left untouched and will be in the output.
     *
     * @param from
     * @param size
     * @param shortlived
     * @param mask
     * @return
     */
    private Synonym anonymizeMasked(Object from, int size, boolean shortlived, String mask) {