com.r3corda.client.fxutils / ReadOnlyBackedObservableMapBase

# ReadOnlyBackedObservableMapBase

`open class ReadOnlyBackedObservableMapBase<K, A, B> : ObservableMap<K, A>`

ReadOnlyBackedObservableMapBase is a base class implementing all abstract functions required for an ObservableMap using a backing HashMap that subclasses should modify.

Non-read-only API calls throw.

### Parameters

`K` - The key type.
`A` - The exposed map element type.
`B` - Auxiliary data subclasses may wish to store in the backing map.

### Constructors

<init> | `ReadOnlyBackedObservableMapBase()` ReadOnlyBackedObservableMapBase is a base class implementing all abstract functions required for an ObservableMap using a backing HashMap that subclasses should modify.

### Properties

backingMap | `val backingMap: HashMap<K, <ERROR CLASS><A, B>>`
entries | `open val entries: MutableSet<MutableEntry<K, A>>`
keys | `open val keys: MutableSet<K>`
size | `open val size: Int`
values | `open val values: MutableCollection<A>`

### Functions

addListener | `open fun addListener(listener: InvalidationListener): Unit` `open fun addListener(listener: MapChangeListener<in K, in A>?): Unit`
clear | `open fun clear(): Unit`
containsKey | `open fun containsKey(key: K): Boolean`
containsValue | `open fun containsValue(value: A): <ERROR CLASS>`
fireChange | `fun fireChange(change: Change<out K, out A>): Unit`
get | `open fun get(key: K): <ERROR CLASS>`
isEmpty | `open fun isEmpty(): Boolean`
put | `open fun put(key: K, value: A): A`
putAll | `open fun putAll(from: Map<out K, A>): Unit`
remove | `open fun remove(key: K): A`
removeListener | `open fun removeListener(listener: InvalidationListener?): Unit` `open fun removeListener(listener: MapChangeListener<in K, in A>?): Unit`

### Extension Functions

createMapChange | `fun <A, K> ObservableMap<K, A>.createMapChange(key: K, removedValue: A?, addedValue: A?): Change<K, A>`
getObservableEntries | `fun <K, V> ObservableMap<K, V>.getObservableEntries(): ObservableList<Entry<K, V>>` val nameToPerson: ObservableMap<String, Person> = (..) val people: ObservableList = nameToPerson.getObservableValues()
getObservableValue | `fun <K, V> ObservableMap<K, V>.getObservableValue(key: K): ObservableValue<V?>` val nameToPerson: ObservableMap<String, Person> = (..) val john: ObservableValue<Person?> = nameToPerson.getObservableValue("John")
getObservableValues | `fun <K, V> ObservableMap<K, V>.getObservableValues(): ObservableList<V>` val nameToPerson: ObservableMap<String, Person> = (..) val people: ObservableList = nameToPerson.getObservableValues()

### Inheritors

AssociatedList | `class AssociatedList<K, out A, B> : ReadOnlyBackedObservableMapBase<K, B, Unit>` AssociatedList creates an ObservableMap from an ObservableList by associating each list element with a unique key. It is not allowed to have several elements map to the same value
LeftOuterJoinedMap | `class LeftOuterJoinedMap<K : Any, A, B, C> : ReadOnlyBackedObservableMapBase<K, C, SimpleObjectProperty<B?>>` LeftOuterJoinedMap implements a special case of a left outer join where were matching on primary keys of both tables.