org.apache.hadoop.hbase.util
Class Strings

java.lang.Object
  extended by org.apache.hadoop.hbase.util.Strings

public class Strings
extends Object

Utility for Strings.


Field Summary
static String DEFAULT_KEYVALUE_SEPARATOR
           
static String DEFAULT_SEPARATOR
           
 
Constructor Summary
Strings()
           
 
Method Summary
static StringBuilder appendKeyValue(StringBuilder sb, String key, Object value)
          Append to a StringBuilder a key/value.
static StringBuilder appendKeyValue(StringBuilder sb, String key, Object value, String separator, String keyValueSeparator)
          Append to a StringBuilder a key/value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SEPARATOR

public static final String DEFAULT_SEPARATOR
See Also:
Constant Field Values

DEFAULT_KEYVALUE_SEPARATOR

public static final String DEFAULT_KEYVALUE_SEPARATOR
See Also:
Constant Field Values
Constructor Detail

Strings

public Strings()
Method Detail

appendKeyValue

public static StringBuilder appendKeyValue(StringBuilder sb,
                                           String key,
                                           Object value)
Append to a StringBuilder a key/value. Uses default separators.

Parameters:
sb - StringBuilder to use
key - Key to append.
value - Value to append.
Returns:
Passed sb populated with key/value.

appendKeyValue

public static StringBuilder appendKeyValue(StringBuilder sb,
                                           String key,
                                           Object value,
                                           String separator,
                                           String keyValueSeparator)
Append to a StringBuilder a key/value. Uses default separators.

Parameters:
sb - StringBuilder to use
key - Key to append.
value - Value to append.
separator - Value to use between key and value.
keyValueSeparator - Value to use between key/value sets.
Returns:
Passed sb populated with key/value.


Copyright © 2010 Apache Software Foundation. All Rights Reserved.