Skip to content
laforge49 edited this page Jul 31, 2011 · 2 revisions

Send the Get message to a sequence actor to get the value associated with a key.

case class Get[K](key: K)

Test.

val alphabet = new java.util.TreeMap[String, String]
alphabet.put("a", "Apple")
alphabet.put("b", "Boy")
alphabet.put("c", "Cat")
val alphabetSeq = new NavMapSeq(alphabet)
println(Future(alphabetSeq, Get("c")))
println(Future(alphabetSeq, Get("d")))

Output.

Cat
null

GetTest

Tutorial

Clone this wiki locally