Returns a string representation of the receiver, containing
the String representation of each key-value pair, sorted ascending by 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();
}
186166
String
rrToString() {
	StringBuffer sb = new StringBuffer();
	sb.append(priority + " ");
	sb.append(weight + " ");
	sb.append(port + " ");
	sb.append(target);
	return sb.toString();
}
120210
public Map<String, String> toMap() {
        Map<String, String> result = new LinkedHashMap<String, String>();
        for (int i = 0, size = size(); i < size; i++) {
            String name = name(i);
            String values = result.get(name);
            if (values == null) {
                values = value(i);
            } else {
                values += ", " + value(i);
            }
            result.put(name, values);
        }
        return result;
    }
406212
protected String keyToString(Object rawKey)
    {
        if (rawKey instanceof String) {
            return (String) rawKey;
        }
        return String.valueOf(rawKey);
    }
765070
public static String objectToString(Object value) {
    if (value == null) {
      return null;
    }
    if (value instanceof String) {
      return (String)value;
    }
    if (value instanceof String[]) {
      return StringUtils.join(encodeString((String[])value), ARRAY_DELIMITER);
    }
    else if (value instanceof Integer) {
      return Integer.toString((Integer)value);
    }
    else if (value instanceof Long) {
      return Long.toString((Long)value);
    }
    else if (value instanceof Double) {
      return Double.toString((Double)value);
    }
    else if (value instanceof Boolean) {
      return Boolean.toString((Boolean)value);
    }
    else if (value instanceof Map) {
      Map<?, ?> map = (Map<?, ?>)value;
      StringBuilder stringValue = new StringBuilder();
      Map.Entry<?, ?>[] entries = Iterators.toArray(map.entrySet().iterator(), Map.Entry.class);
      for (int i = 0; i < entries.length; i++) {
        Map.Entry<?, ?> entry = entries[i];
        String entryKey = encodeString(Objects.toString(entry.getKey(), ""));
        String entryValue = encodeString(Objects.toString(entry.getValue(), ""));
        stringValue.append(entryKey).append(KEY_VALUE_DELIMITER).append(entryValue);
        if (i < entries.length - 1) {
          stringValue.append(ARRAY_DELIMITER);
        }
      }
      return stringValue.toString();
    }
    throw new IllegalArgumentException("Unsupported type: " + value.getClass().getName());
  }
649204
public List<String> getValuesAsString() {
        List<CharSequence> valuesAsCharSequence = getValues();
        List<String> res = new ArrayList<>(valuesAsCharSequence.size());
        for (CharSequence value : valuesAsCharSequence) {
            res.add(value.toString());
        }
        return res;
    }
369426
def to_string(self, value):
        
        self._warn_deprecated_outside_JSONField()
        value = json.dumps(
            self.to_json(value),
            indent=2,
            sort_keys=True,
            separators=(',', ': '),
        )
        return value
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();
    }
857700
public static String mapToString(Map map)
    {
        Set entries = map.entrySet();
        Iterator iter = entries.iterator();
        StringBuffer buff = new StringBuffer();
        while (iter.hasNext())
        {
            Map.Entry entry = (Map.Entry) iter.next();
            buff.append("[" + entry.getKey() + "," + entry.getValue() + "]\n");
        }
        return buff.toString();
    }
931592
public String keyList() {
		String separator = "";
		StringBuilder buffer = new StringBuilder();
		String item;

		for (int i = 0; i < names.size(); i++) {
			item = names.get(i);
			buffer.append(separator + item);
			separator = ", ";
		}

		return buffer.toString();
	}
213420
private String toStringImpl() {
		StringBuffer result = new StringBuffer(128);
		result.append('@');
		result.append(type.getName());
		result.append('(');
		boolean firstMember = true;
		for (Map.Entry<String, Object> e : memberValues.entrySet()) {
			if (firstMember)
				firstMember = false;
			else
				result.append(", ");

			result.append(e.getKey());
			result.append('=');
			result.append(memberValueToString(e.getValue()));
		}
		result.append(')');
		return result.toString();
	}
449073
public static String STOREtoString() {
    int[] cnts = new int[1];
    Object[] kvs = H2O.STORE.raw_array();
    // Start the walk at slot 2, because slots 0,1 hold meta-data
    for( int i=2; i<kvs.length; i += 2 ) {
      // In the raw backing array, Keys and Values alternate in slots
      Object ov = kvs[i+1];
      if( !(ov instanceof Value) ) continue; // Ignore tombstones and Primes and null's
      Value val = (Value)ov;
      if( val.isNull() ) { Value.STORE_get(val._key); continue; } // Another variant of NULL
      int t = val.type();
      while( t >= cnts.length ) cnts = Arrays.copyOf(cnts,cnts.length<<1);
      cnts[t]++;
    }
    StringBuilder sb = new StringBuilder();
    for( int t=0; t<cnts.length; t++ )
      if( cnts[t] != 0 )
        sb.append(String.format("-%30s %5d\n",TypeMap.CLAZZES[t],cnts[t]));
    return sb.toString();
  }
595458
def to_str(self):
        ''''''
        pairs = []
        for name, value in self.get_all():
            if value and self._wrap_width:
                pairs.append('{0}:{1}'.format(
                    name,
                    '\r\n'.join(textwrap.wrap(
                        value, width=self._wrap_width,
                        drop_whitespace=False, initial_indent=' ',
                        subsequent_indent=' '
                    ))
                ))
            elif value:
                pairs.append('{0}: {1}'.format(name, value))
            else:
                pairs.append('{0}:'.format(name))

        pairs.append('')
        return '\r\n'.join(pairs)
814989
def members(self):
        
        if self.serialized:
            return set(map(
                self._loads, self._client.smembers(self.key_prefix)))
        else:
            return set(map(
                self._decode, self._client.smembers(self.key_prefix)))
249769
private List decodeSort(String value) {
        ArrayList sorts = new ArrayList();

        String[] nameAndSorts = value.split(DELIM_GRID_NAME);
        if(nameAndSorts.length != 2)
            return null;

        String namespace = nameAndSorts[0];
        String[] sortStrings = nameAndSorts[1].split(DELIM_SORT_TERM);

        // find the list of sorted columns
        // two columns of the bugs grid would be sorted as:
        //
        // netui_sort=bugs~id,-priority
        for(int i = 0; i < sortStrings.length; i++) {
            String sort = sortStrings[i];
            SortDirection sortDirection = SortDirection.NONE;
            if(sort.startsWith("-"))
                sortDirection = SortDirection.DESCENDING;
            else
                sortDirection = SortDirection.ASCENDING;
            String sortExpression = (sortDirection == SortDirection.DESCENDING ? sort.substring(1) : sort);
            Sort gridSort = _config.createSort();
            gridSort.setSortExpression(sortExpression);
            gridSort.setDirection(sortDirection);
            sorts.add(gridSort);
        }

        return sorts;
    }
592309
def to_s

            return '' unless @hash.kind_of?( Hash )
            keys = @sorted ? @hash.keys.sort : @hash.keys
            str  = ''
            seen = {}

            keys.each do |key|
                unless seen.has_key?( key )
                    val = @hash[key]
                    val = stringify( val )  if val.kind_of?( Hash )
                    val = rotate( val )     if val.kind_of?( Array )
                    str += sprintf( ' %s="%s"', key( key ), val( val ) )
                end
                seen[key] = 1
            end

            return str
        end
1211466
private static String[] decodeKey(Key k) {
    String s = new String((k.isChunkKey()) ? Arrays.copyOfRange(k._kb, Vec.KEY_PREFIX_LEN, k._kb.length):k._kb);
    return decode(s);
  }