=cdd #17778 Convert samples to java

This commit is contained in:
Patrik Nordwall 2015-07-01 09:46:58 +02:00
parent 7bfc56f3f0
commit 94a61c7eb2
32 changed files with 2220 additions and 67 deletions

View file

@ -44,8 +44,19 @@ final class LWWMap[A] private[akka] (
type T = LWWMap[A]
/**
* Scala API: All entries of the map.
*/
def entries: Map[String, A] = underlying.entries.map { case (k, r) k -> r.value }
/**
* Java API: All entries of the map.
*/
def getEntries(): java.util.Map[String, A] = {
import scala.collection.JavaConverters._
entries.asJava
}
def get(key: String): Option[A] = underlying.get(key).map(_.value)
def contains(key: String): Boolean = underlying.contains(key)