Package com.google.common.base
Class Joiner.MapJoiner
- java.lang.Object
-
- com.google.common.base.Joiner.MapJoiner
-
- Enclosing class:
- Joiner
@Deprecated(since="2022-12-01") public static final class Joiner.MapJoiner extends java.lang.ObjectDeprecated.The Google Guava Core Libraries are deprecated and will not be part of the AEM SDK after April 2023An object that joins map entries in the same manner asJoinerjoins iterables and arrays. LikeJoiner, it is thread-safe and immutable.In addition to operating on
Mapinstances,MapJoinercan operate onMultimapentries in two distinct modes:- To output a separate entry for each key-value pair, pass
multimap.entries()to aMapJoinermethod that accepts entries as input, and receive output of the formkey1=A&key1=B&key2=C. - To output a single entry for each key, pass
multimap.asMap()to aMapJoinermethod that accepts a map as input, and receive output of the formkey1=[A, B]&key2=C.
- Since:
- 2.0 (imported from Google Collections Library)
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description <A extends java.lang.Appendable>
AappendTo(A appendable, java.lang.Iterable<? extends java.util.Map.Entry<?,?>> entries)Deprecated.Appends the string representation of each entry inentries, using the previously configured separator and key-value separator, toappendable.<A extends java.lang.Appendable>
AappendTo(A appendable, java.util.Iterator<? extends java.util.Map.Entry<?,?>> parts)Deprecated.Appends the string representation of each entry inentries, using the previously configured separator and key-value separator, toappendable.<A extends java.lang.Appendable>
AappendTo(A appendable, java.util.Map<?,?> map)Deprecated.Appends the string representation of each entry ofmap, using the previously configured separator and key-value separator, toappendable.java.lang.StringBuilderappendTo(java.lang.StringBuilder builder, java.lang.Iterable<? extends java.util.Map.Entry<?,?>> entries)Deprecated.Appends the string representation of each entry inentries, using the previously configured separator and key-value separator, tobuilder.java.lang.StringBuilderappendTo(java.lang.StringBuilder builder, java.util.Iterator<? extends java.util.Map.Entry<?,?>> entries)Deprecated.Appends the string representation of each entry inentries, using the previously configured separator and key-value separator, tobuilder.java.lang.StringBuilderappendTo(java.lang.StringBuilder builder, java.util.Map<?,?> map)Deprecated.Appends the string representation of each entry ofmap, using the previously configured separator and key-value separator, tobuilder.java.lang.Stringjoin(java.lang.Iterable<? extends java.util.Map.Entry<?,?>> entries)Deprecated.Returns a string containing the string representation of each entry inentries, using the previously configured separator and key-value separator.java.lang.Stringjoin(java.util.Iterator<? extends java.util.Map.Entry<?,?>> entries)Deprecated.Returns a string containing the string representation of each entry inentries, using the previously configured separator and key-value separator.java.lang.Stringjoin(java.util.Map<?,?> map)Deprecated.Returns a string containing the string representation of each entry ofmap, using the previously configured separator and key-value separator.Joiner.MapJoineruseForNull(java.lang.String nullText)Deprecated.Returns a map joiner with the same behavior as this one, except automatically substitutingnullTextfor any provided null keys or values.
-
-
-
Method Detail
-
appendTo
public <A extends java.lang.Appendable> A appendTo(A appendable, java.util.Map<?,?> map) throws java.io.IOExceptionDeprecated.Appends the string representation of each entry ofmap, using the previously configured separator and key-value separator, toappendable.- Throws:
java.io.IOException
-
appendTo
public java.lang.StringBuilder appendTo(java.lang.StringBuilder builder, java.util.Map<?,?> map)Deprecated.Appends the string representation of each entry ofmap, using the previously configured separator and key-value separator, tobuilder. Identical toappendTo(Appendable, Map), except that it does not throwIOException.
-
join
public java.lang.String join(java.util.Map<?,?> map)
Deprecated.Returns a string containing the string representation of each entry ofmap, using the previously configured separator and key-value separator.
-
appendTo
@Beta public <A extends java.lang.Appendable> A appendTo(A appendable, java.lang.Iterable<? extends java.util.Map.Entry<?,?>> entries) throws java.io.IOException
Deprecated.Appends the string representation of each entry inentries, using the previously configured separator and key-value separator, toappendable.- Throws:
java.io.IOException- Since:
- 10.0
-
appendTo
@Beta public <A extends java.lang.Appendable> A appendTo(A appendable, java.util.Iterator<? extends java.util.Map.Entry<?,?>> parts) throws java.io.IOException
Deprecated.Appends the string representation of each entry inentries, using the previously configured separator and key-value separator, toappendable.- Throws:
java.io.IOException- Since:
- 11.0
-
appendTo
@Beta public java.lang.StringBuilder appendTo(java.lang.StringBuilder builder, java.lang.Iterable<? extends java.util.Map.Entry<?,?>> entries)
Deprecated.Appends the string representation of each entry inentries, using the previously configured separator and key-value separator, tobuilder. Identical toappendTo(Appendable, Iterable), except that it does not throwIOException.- Since:
- 10.0
-
appendTo
@Beta public java.lang.StringBuilder appendTo(java.lang.StringBuilder builder, java.util.Iterator<? extends java.util.Map.Entry<?,?>> entries)
Deprecated.Appends the string representation of each entry inentries, using the previously configured separator and key-value separator, tobuilder. Identical toappendTo(Appendable, Iterable), except that it does not throwIOException.- Since:
- 11.0
-
join
@Beta public java.lang.String join(java.lang.Iterable<? extends java.util.Map.Entry<?,?>> entries)
Deprecated.Returns a string containing the string representation of each entry inentries, using the previously configured separator and key-value separator.- Since:
- 10.0
-
join
@Beta public java.lang.String join(java.util.Iterator<? extends java.util.Map.Entry<?,?>> entries)
Deprecated.Returns a string containing the string representation of each entry inentries, using the previously configured separator and key-value separator.- Since:
- 11.0
-
useForNull
@CheckReturnValue public Joiner.MapJoiner useForNull(java.lang.String nullText)
Deprecated.Returns a map joiner with the same behavior as this one, except automatically substitutingnullTextfor any provided null keys or values.
-
-