EntryFields

Wraps Map to override equals and take into account order of items in equality checks.

Constructors

Link copied to clipboard
constructor(fields: Map<String, EntryValue>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val entries: Set<Map.Entry<String, EntryValue>>
Link copied to clipboard
open override val keys: Set<String>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val size: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val values: Collection<EntryValue>

Functions

Link copied to clipboard
open override fun containsKey(key: String): Boolean
Link copied to clipboard
open override fun containsValue(value: EntryValue): Boolean
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard

Returns a new EntryFields containing all key-value pairs matching the given predicate.

Link copied to clipboard
fun filterKeys(predicate: (String) -> Boolean): EntryFields

Returns EntryFields containing all key-value pairs with keys matching the given predicate.

Link copied to clipboard

Returns a new EntryFields containing all key-value pairs not matching the given predicate.

Link copied to clipboard

Returns EntryFields containing all key-value pairs with values matching the given predicate.

Link copied to clipboard
operator fun get(key: BasicField): EntryValue?
open operator override fun get(key: String): EntryValue?
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun isEmpty(): Boolean
Link copied to clipboard

Returns a new EntryFields with entries having the keys obtained by applying the transform function to each entry and the values of fields.

Link copied to clipboard

Returns a new EntryFields with entries having the keys of fields and the values obtained by applying the transform function to each entry.

Link copied to clipboard
operator fun minus(keys: Array<String>): EntryFields

Returns EntryFields containing all entries of the original except those entries the keys of which are contained in the given keys array.

operator fun minus(key: String): EntryFields

Returns EntryFields containing all entries of the original except the entry with the given key.

operator fun minus(keys: Iterable<String>): EntryFields

Returns EntryFields containing all entries of the original except those entries the keys of which are contained in the given keys collection.

operator fun minus(keys: Sequence<String>): EntryFields

Returns EntryFields containing all entries of the original except those entries the keys of which are contained in the given keys sequence.

Link copied to clipboard
operator fun plus(pairs: Array<out Pair<String, EntryValue>>): EntryFields

Creates a new EntryFields by replacing or adding entries from a given array of key-value pairs. Those pairs with unique keys are iterated in the end in the order of pairs array.

operator fun plus(pair: Pair<String, EntryValue>): EntryFields

Creates a new EntryFields by replacing or adding an entry from a given key-value pair. The pair is iterated in the end if it has a unique key.

operator fun plus(pairs: Iterable<Pair<String, EntryValue>>): EntryFields

Creates a new EntryFields by replacing or adding entries from a given collection of key-value pairs. Those pairs with unique keys are iterated in the end in the order of pairs collection.

operator fun plus(map: Map<String, EntryValue>): EntryFields

Creates a new EntryFields by replacing or adding entries from another map. Those entries of another map that are missing in this map are iterated in the end in the order of that map.

operator fun plus(pairs: Sequence<Pair<String, EntryValue>>): EntryFields

Creates a new EntryFields by replacing or adding entries from a given sequence of key-value pairs. Those pairs with unique keys are iterated in the end in the order of pairs sequence.