Maps

com.sksamuel.elastic4s.ext.Maps$
object Maps

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Maps.type

Members list

Value members

Concrete methods

def deepAsJava[K](src: Map[K, AnyRef]): Map[K, AnyRef]

Given a scala.collection.immutable.Map[k, AnyRef], this method will return a java.util.Map[k, AnyRef] where each value has been transformed such that:

Given a scala.collection.immutable.Map[k, AnyRef], this method will return a java.util.Map[k, AnyRef] where each value has been transformed such that:

  • if the value is also a scala map, then it will be recursively converted into a java map
  • otherwise it will be returned as is

Attributes

def deepAsScala[K](src: Map[K, AnyRef]): Map[K, AnyRef]

Given a java.util.Map[k, AnyRef], this method will return a scala.collection.immutable.Map[k, AnyRef] where each value has been transformed such that:

Given a java.util.Map[k, AnyRef], this method will return a scala.collection.immutable.Map[k, AnyRef] where each value has been transformed such that:

  • if the value is also a java map, then it will be recursively converted into a scala map
  • otherwise it will be returned as is

Attributes

def flatten[V](map: Map[String, V], separator: String): Map[String, V]

Given a nested map of strings, will create a flatted map, where the strings are joined with a separator. So given Map("a" -> "b", "c" -> Map("d" -> "e")) then the output will be Map("a" -> "b", "c.d" -> "e")

Given a nested map of strings, will create a flatted map, where the strings are joined with a separator. So given Map("a" -> "b", "c" -> Map("d" -> "e")) then the output will be Map("a" -> "b", "c.d" -> "e")

Attributes