@Override
  public boolean addAll(final Collection<? extends String> collection) {
    final int initialSize = hostnamesAllowlist.size();
    for (final String string : collection) {
      if (Strings.isNullOrEmpty(string)) {
        throw new IllegalArgumentException("Hostname cannot be empty string or null string.");
      }
      for (final String s : Splitter.onPattern("\\s*,+\\s*").split(string)) {
        if ("all".equals(s)) {
          hostnamesAllowlist.add("*");
        } else {
          hostnamesAllowlist.add(s);
        }
      }
    }

    if (hostnamesAllowlist.contains("none")) {
      if (hostnamesAllowlist.size() > 1) {
        throw new IllegalArgumentException("Value 'none' can't be used with other hostnames");
      }
    } else if (hostnamesAllowlist.contains("*")) {
      if (hostnamesAllowlist.size() > 1) {
        throw new IllegalArgumentException(
            "Values '*' or 'all' can't be used with other hostnames");
      }
    }

    return hostnamesAllowlist.size() != initialSize;
  }
Instantiates a new Json rpc allowlist hosts property.
app/src/main/java/org/hyperledger/besu/cli/custom/JsonRPCAllowlistHostsProperty.java