com.google.common.base
Class Joiner.MapJoiner

java.lang.Object
  extended by com.google.common.base.Joiner.MapJoiner
Enclosing class:
Joiner

public static class Joiner.MapJoiner
extends Object

An object that joins map entries in the same manner as Joiner joins iterables and arrays.


Method Summary
<A extends Appendable>
A
appendTo(A appendable, Map<?,?> map)
          Appends the string representation of each entry of map, using the previously configured separator and key-value separator, to appendable.
 StringBuilder appendTo(StringBuilder builder, Map<?,?> map)
          Appends the string representation of each entry of map, using the previously configured separator and key-value separator, to builder.
 String join(Map<?,?> map)
          Returns a string containing the string representation of each entry of map, using the previously configured separator and key-value separator.
 Joiner.MapJoiner useForNull(String nullText)
          Returns a map joiner with the same behavior as this one, except automatically substituting nullText for any provided null keys or values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

appendTo

public <A extends Appendable> A appendTo(A appendable,
                                         Map<?,?> map)
                              throws IOException
Appends the string representation of each entry of map, using the previously configured separator and key-value separator, to appendable.

Throws:
IOException

appendTo

public StringBuilder appendTo(StringBuilder builder,
                              Map<?,?> map)
Appends the string representation of each entry of map, using the previously configured separator and key-value separator, to builder. Identical to appendTo(Appendable, Map), except that it does not throw IOException.


join

public String join(Map<?,?> map)
Returns a string containing the string representation of each entry of map, using the previously configured separator and key-value separator.


useForNull

public Joiner.MapJoiner useForNull(String nullText)
Returns a map joiner with the same behavior as this one, except automatically substituting nullText for any provided null keys or values.