=cdd #17778 Convert samples to java
This commit is contained in:
parent
7bfc56f3f0
commit
94a61c7eb2
32 changed files with 2220 additions and 67 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue