Formats the supplied key/value arguments into the supplied string builder as
{@code key=value, key=value, ...}.
@return the supplied string builder.
481996
public static StringBuilder format (StringBuilder into, Object... args) {
    for (int ii = 0, ll = args.length/2; ii < ll; ii++) {
      if (ii > 0) into.append(", ");
      into.append(args[2*ii]).append("=").append(args[2*ii+1]);
    }
    return into;
  }
673820
protected StringBuilder appendTo(StringBuilder builder) {
    return jobId.appendTo(builder).
                 append(SEPARATOR).
                 append(isMap ? 'm' : 'r').
                 append(SEPARATOR).
                 append(idFormat.format(id));
  }
1348763
public static FormattedStringBuilder wrap(StringBuilder builder) {
        FormattedStringBuilder b = new FormattedStringBuilder();
        b._delegate = builder;
        return b;
    }
1174436
public JSONBuilder quote(String value) {
        _sb.append('"');
        for (int i = 0; i < value.length(); ++i) {
            char c = value.charAt(i);
            switch (c) {
            case '"':
                _sb.append("\\\"");
                break;
            case '\\':
                _sb.append("\\\\");
                break;
            default:
                if (c < 0x20) {
                    _sb.append(CTRLCHARS[c]);
                } else {
                    _sb.append(c);
                }
                break;
            }
        }
        _sb.append('"');
        return this;
    }
1277297
private boolean appendMap(StringBuilder builder, Object value)
    {
        boolean isPresent = false;
        if (value instanceof Map)
        {
            Map map = ((Map) value);
            isPresent = true;
            builder.append(Constants.OPEN_CURLY_BRACKET);
            for (Object mapKey : map.keySet())
            {
                Object mapValue = map.get(mapKey);
                // Allowing null keys.
                appendValue(builder, mapKey != null ? mapKey.getClass() : null, mapKey, false);
                builder.append(Constants.COLON);
                // Allowing null values.
                appendValue(builder, mapValue != null ? mapValue.getClass() : null, mapValue, false);
                builder.append(Constants.COMMA);
            }
            if (!map.isEmpty())
            {
                builder.deleteCharAt(builder.length() - 1);
            }

            builder.append(Constants.CLOSE_CURLY_BRACKET);
        }
        else
        {
            appendValue(builder, value.getClass(), value, false);
        }
        return isPresent;
    }
1292652
private static void appendEscapedByte(StringBuilder builder, byte value) {
        builder.append('%');
        builder.append(HEX[(value >> 4) & 0x0f]);
        builder.append(HEX[value & 0x0f]);
    }
1225247
public static StringBuilder appendKeyDqValue(final StringBuilder sb, final Entry<String, String> entry) {
        return appendKeyDqValue(sb, entry.getKey(), entry.getValue());
    }
1084237
public static StringBuilder format(String compiledPattern, CharSequence value,
            StringBuilder appendTo, FieldPosition pos) {
        int[] offsets = new int[1];
        SimpleFormatterImpl.formatAndAppend(compiledPattern, appendTo, offsets, value);
        if (pos.getBeginIndex() != 0 || pos.getEndIndex() != 0) {
            if (offsets[0] >= 0) {
                pos.setBeginIndex(pos.getBeginIndex() + offsets[0]);
                pos.setEndIndex(pos.getEndIndex() + offsets[0]);
            } else {
                pos.setBeginIndex(0);
                pos.setEndIndex(0);
            }
        }
        return appendTo;
    }
747777
protected void appendField(final StringBuilder builder, final String key, final int value) {
        if (builder.length() > 0) {
            builder.append("&");
        }
        builder.append(key).append("=").append(value);
    }
483513
public String toStringByValue() {
	IntArrayList theKeys = new IntArrayList();
	keysSortedByValue(theKeys);

	StringBuffer buf = new StringBuffer();
	buf.append("[");
	int maxIndex = theKeys.size() - 1;
	for (int i = 0; i <= maxIndex; i++) {
		int key = theKeys.get(i);
	    buf.append(String.valueOf(key));
		buf.append("->");
	    buf.append(String.valueOf(get(key)));
		if (i < maxIndex) buf.append(", ");
	}
	buf.append("]");
	return buf.toString();
}
169710
protected String format(String key, String defaultPattern, Object... args) {
        String escape = escape(defaultPattern);
        String s = lookupPattern(key, escape);
        Object[] objects = escapeAll(args);
        return MessageFormat.format(s, objects);
    }
1227148
static String buildFormatString(FormatOptions options, FormatChar formatChar) {
    // The format char is guaranteed to be a lower-case ASCII character, so can be made upper case
    // by simply subtracting 0x20 (or clearing the 6th bit).
    char c = formatChar.getChar();
    c = options.shouldUpperCase() ? (char) (c & ~0x20) : c;
    return options.appendPrintfOptions(new StringBuilder("%")).append(c).toString();
  }
204411
public static String format(String msg, Object... args) {

        if (args == null || args.length == 0)
            return msg;

        StringBuilder sb = new StringBuilder();
        int argId = 0;
        for (int i = 0; i < msg.length(); i++) {

            final char c = msg.charAt(i);
            if (c == '{' && msg.charAt(i + 1) == '}') {
                if (args.length > argId) {
                    Object val = args[argId++];
                    if (val == null)
                        sb.append("null");
                    else
                        sb.append(val.toString());
                } else {
                    sb.append("{{MISSING ARG}}");
                }
                i++;
            } else {
                sb.append(c);
            }
        }
        return sb.toString();
    }
2341
protected String getValuesString() {
        final StringBuilder builder = new StringBuilder();

        for(final String value : values) {
            builder.append(AciURLCodec.getInstance().encode(value)).append(',');
        }

        if(builder.length() > 0) {
            builder.deleteCharAt(builder.length() - 1);
        }

        return builder.toString();
    }
1288558
public @NotNull MediaFormatBuilder property(String key, Object value) {
    if (key == null) {
      throw new IllegalArgumentException("Key argument must not be null.");
    }
    this.properties.put(key, value);
    return this;
  }
1225094
protected String format(String format, Object... args) {

    if (format == null) {
      return null;
    }
    if (args == null) {
      return format;
    }
    StringBuilder buffer = new StringBuilder();
    int argumentIndex = 0;
    int formatStartIndex = 0;
    while (formatStartIndex >= 0) {
      if (argumentIndex >= args.length) {
        // too few arguments given - append the rest of the format string
        buffer.append(format.substring(formatStartIndex));
        formatStartIndex = -1;
      } else {
        int formatEndIndex = format.indexOf("{}");
        if (formatEndIndex == -1) {
          buffer.append(format.substring(formatStartIndex));
          formatStartIndex = -1;
        } else {
          buffer.append(format.substring(formatStartIndex, formatEndIndex));
          formatStartIndex = formatEndIndex + 2;
          buffer.append(args[argumentIndex++]);
        }
      }
    }
    return buffer.toString();
  }
505361
public T getValueByString(String key) {
        for (T value : values) {
            if (keyFactory.generateKey(value).equals(key)) {
                return value;
            }
        }
        return null;
    }