// Path: src/main/java/be/dnsbelgium/rdap/sample/parser/fieldparser/FieldParser.java
// public interface FieldParser<T> {
//   public T parse(String value);
// }


import be.dnsbelgium.rdap.sample.parser.fieldparser.FieldParser;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
package be.dnsbelgium.rdap.sample.parser;



public class ParseLayout {
  private static final Pattern INDEXED_FIELD_PATTERN = Pattern.compile("^(.+?)(\\d+)$");

  private Map<String, Map<WhoisKeyBlock, WhoisEntry>> layout = new HashMap<>();

  public void addEntry(WhoisKeyBlock block, String key, String path, boolean itemRepeatable) {
    addEntry(new WhoisEntry(block, key, path, itemRepeatable));
  }

  public void addEntry(WhoisKeyBlock block, boolean firstBlockItem, String key, String path, boolean itemRepeatable) {
    addEntry(new WhoisEntry(block, firstBlockItem, key, path, itemRepeatable));
  }

  public void addEntry(WhoisKeyBlock block, String key, String path, boolean itemRepeatable, FieldParser fieldParser) {
    addEntry(new WhoisEntry(block, key, path, itemRepeatable, fieldParser));
  }

// Path: src/main/java/be/dnsbelgium/rdap/sample/parser/fieldparser/FieldParser.java
// public interface FieldParser<T> {
//   public T parse(String value);
// }


// Path: src/main/java/be/dnsbelgium/rdap/sample/parser/ParseLayout.java
import be.dnsbelgium.rdap.sample.parser.fieldparser.FieldParser;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

package be.dnsbelgium.rdap.sample.parser;



public class ParseLayout {
  private static final Pattern INDEXED_FIELD_PATTERN = Pattern.compile("^(.+?)(\\d+)$");

  private Map<String, Map<WhoisKeyBlock, WhoisEntry>> layout = new HashMap<>();

  public void addEntry(WhoisKeyBlock block, String key, String path, boolean itemRepeatable) {
    addEntry(new WhoisEntry(block, key, path, itemRepeatable));
  }

  public void addEntry(WhoisKeyBlock block, boolean firstBlockItem, String key, String path, boolean itemRepeatable) {
    addEntry(new WhoisEntry(block, firstBlockItem, key, path, itemRepeatable));
  }

  public void addEntry(WhoisKeyBlock block, String key, String path, boolean itemRepeatable, FieldParser fieldParser) {
    addEntry(new WhoisEntry(block, key, path, itemRepeatable, fieldParser));
  }

  public void addEntry(WhoisKeyBlock block, boolean firstBlockItem, String key, String path, boolean itemRepeatable, FieldParser fieldParser) {