class UnquotedString implements CharSequence {

    private final String string;

    private UnquotedString(String string) {
      this.string = requireNonNull(string, "string is mandatory");
    }

    @Override
    public int length() {
      return string.length();
    }

    @Override
    public char charAt(int index) {
      return string.charAt(index);
    }

    @Override
    public CharSequence subSequence(int start, int end) {
      return string.subSequence(start, end);
    }

    @Override
    public String toString() {
      return string;
    }

    @Override
    public int hashCode() {
      final int prime = 31;
      int result = 1;
      result = prime * result + ((string == null) ? 0 : string.hashCode());
      return result;
    }

    @Override
    public boolean equals(Object obj) {
      if (this == obj) return true;
      if (obj == null) return false;
      if (getClass() != obj.getClass()) return false;
      UnquotedString other = (UnquotedString) obj;
      return Objects.equals(string, other.string);
    }
  }

  /**
   * Creates a new <code>{@link BasicErrorMessageFactory}</code>.
   *
   * @param format the format string.
   * @param arguments arguments referenced by the format specifiers in the format string.
   */
  public BasicErrorMessageFactory(String format, Object... arguments) {
    this.format = format;
    this.arguments = arguments;
  }

  /** {@inheritDoc} */
  @Override
  public String create(Description d, Representation representation) {
    return formatter.format(d, representation, format, arguments);
  }

  /** {@inheritDoc} */
  @Override
  public String create(Description d) {
    return formatter.format(d, CONFIGURATION_PROVIDER.representation(), format, arguments);
  }

  /** {@inheritDoc} */
  @Override
  public String create() {
    return formatter.format(emptyDescription(), CONFIGURATION_PROVIDER.representation(), format, arguments);
  }

  /**
   * Return a string who will be unquoted in message format (without '')
   *
   * @param string the string who will be unquoted.
   * @return an unquoted string in message format.
   */
  protected static CharSequence unquotedString(String string) {
    return new UnquotedString(string);
  }

  @Override
  public boolean equals(Object obj) {<FILL_FUNCTION_BODY>

    if (this == obj)
      return true;
    if (obj == null)
      return false;
    if (getClass() != obj.getClass())
      return false;
    BasicErrorMessageFactory other = (BasicErrorMessageFactory) obj;
    if (!deepEquals(format, other.format))
      return false;
    // because it does not manage array recursively, don't use : Arrays.equals(arguments, other.arguments);
    // example if arguments[1] and other.arguments[1] are logically same arrays but not same object, it will return
    // false
    return deepEquals(arguments, other.arguments);
  
<no_super_class>