CborMap class abstract
A CBOR map.
Constructors
-
CborMap(Map<
CborValue, CborValue> items, {List<int> tags, CborLengthType type}) -
Create a new CborMap from a view of the given map.
factory
-
CborMap.fromEntries(Iterable<
MapEntry< entries, {List<CborValue, CborValue> >int> tags, CborLengthType type}) -
Create a new CborMap from entries.
factory
-
CborMap.fromIterables(Iterable<
CborValue> key, Iterable<CborValue> values, {List<int> tags, CborLengthType type}) -
Create a new CborMap from key and value.
factory
-
CborMap.of(Map<
CborValue, CborValue> items, {List<int> tags, CborLengthType type}) -
Create a new CborMap as a copy of the given map.
factory
Properties
-
entries
→ Iterable<
MapEntry< CborValue, CborValue> > -
The map entries of this.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isEmpty → bool
-
Whether there is no key/value pair in the map.
no setterinherited
- isNotEmpty → bool
-
Whether there is at least one key/value pair in the map.
no setterinherited
-
keys
→ Iterable<
CborValue> -
The keys of this.
no setterinherited
- length → int
-
The number of key/value pairs in the map.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
Additional tags provided to the value.
no setterinherited
- type → CborLengthType
-
no setter
-
values
→ Iterable<
CborValue> -
The values of this.
no setterinherited
Methods
-
addAll(
Map< CborValue, CborValue> other) → void -
Adds all key/value pairs of
other
to this map.inherited -
addEntries(
Iterable< MapEntry< newEntries) → voidCborValue, CborValue> > -
Adds all key/value pairs of
newEntries
to this map.inherited -
cast<
RK, RV> () → Map< RK, RV> -
Provides a view of this map as having
RK
keys andRV
instances, if necessary.inherited -
clear(
) → void -
Removes all entries from the map.
inherited
-
containsKey(
Object? key) → bool -
Whether this map contains the given
key
.inherited -
containsValue(
Object? value) → bool -
Whether this map contains the given
value
.inherited -
encode(
EncodeSink sink) → void -
inherited
-
forEach(
void action(CborValue key, CborValue value)) → void -
Applies
action
to each key/value pair of the map.inherited -
map<
K2, V2> (MapEntry< K2, V2> convert(CborValue key, CborValue value)) → Map<K2, V2> -
Returns a new map where all entries of this map are transformed by
the given
convert
function.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
putIfAbsent(
CborValue key, CborValue ifAbsent()) → CborValue -
Look up the value of
key
, or add a new entry if it isn't there.inherited -
remove(
Object? key) → CborValue? -
Removes
key
and its associated value, if present, from the map.inherited -
removeWhere(
bool test(CborValue key, CborValue value)) → void -
Removes all entries of this map that satisfy the given
test
.inherited -
toJson(
{Object? substituteValue, bool allowMalformedUtf8 = false}) → Object? -
Transform this into a JSON encodable value.
inherited
-
toJsonInternal(
Set< Object> cyclicCheck, ToJsonOptions o) → Object? -
inherited
-
toObject(
{bool parseDateTime = true, bool parseUri = true, bool decodeBase64 = false, bool allowMalformedUtf8 = false}) → Object? -
Transforms the CborValue into a Dart object.
inherited
-
toObjectInternal(
Set< Object> cyclicCheck, ToObjectOptions o) → Object? -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
CborValue key, CborValue update(CborValue value), {CborValue ifAbsent()?}) → CborValue -
Updates the value for the provided
key
.inherited -
updateAll(
CborValue update(CborValue key, CborValue value)) → void -
Updates all values.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
Object? key) → CborValue? -
The value for the given
key
, ornull
ifkey
is not in the map.inherited -
operator []=(
CborValue key, CborValue value) → void -
Associates the
key
with the givenvalue
.inherited