Class Splitter.MapSplitter

  • Enclosing class:
    Splitter

    @Beta
    @Deprecated(since="2022-12-01")
    public static final class Splitter.MapSplitter
    extends java.lang.Object
    Deprecated.
    The Google Guava Core Libraries are deprecated and will not be part of the AEM SDK after April 2023
    An object that splits strings into maps as Splitter splits iterables and lists. Like Splitter, it is thread-safe and immutable.
    Since:
    10.0
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​java.lang.String> split​(java.lang.CharSequence sequence)
      Deprecated.
      Splits sequence into substrings, splits each substring into an entry, and returns an unmodifiable map with each of the entries.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • split

        public java.util.Map<java.lang.String,​java.lang.String> split​(java.lang.CharSequence sequence)
        Deprecated.
        Splits sequence into substrings, splits each substring into an entry, and returns an unmodifiable map with each of the entries. For example, Splitter.on(';').trimResults().withKeyValueSeparator("=>") .split("a=>b ; c=>b") will return a mapping from "a" to "b" and "c" to b.

        The returned map preserves the order of the entries from sequence.

        Throws:
        java.lang.IllegalArgumentException - if the specified sequence does not split into valid map entries, or if there are duplicate keys