code: private boolean isIllegal(final char c, final State state) {
          switch (state) {
              case FRAGMENT:
                  return (strict ? STRICT_ILLEGAL_IN_FRAGMENT : ILLEGAL_IN_FRAGMENT).matches(c);
              case QUERY:
                  return (strict ? STRICT_ILLEGAL_IN_QUERY : ILLEGAL_IN_QUERY).matches(c);
              case QUERY_PARAM:
                  return (strict ? STRICT_ILLEGAL_IN_QUERY_PARAM : ILLEGAL_IN_QUERY_PARAM).matches(c);
              case PATH:
                  return (strict ? STRICT_ILLEGAL_IN_PATH : ILLEGAL_IN_PATH).matches(c);
              case HOST:
                  return ILLEGAL_IN_HOST.matches(c);
              default:
                  throw new AssertionError(state);
          }
      }
docs: Returns whether or not this character is illegal in the given state