Attribute extension type

Attribute extension type wraps Element to distinguish them.

on
  • Element

Constructors

Attribute.from(Element element)

Properties

args UnmodifiableListView<KeyVal>
Get immutable list of KeyVal
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
isAttribute bool
no setterinherited
isComment bool
no setterinherited
isGlobal bool
no setterinherited
isStandard bool
no setterinherited
name String
Attribute elements have a name.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
text String
finalinherited
type → ElementType
finalinherited

Methods

add(KeyVal kv) → void
Add a new KeyVal
inherited
getKeyValue(String key, [String? or]) String?
Return KeyVal.val as String or null. Optional or value when key is null or unable to parse. Case-insensitive.
inherited
getKeyValueAsBool(String key, [bool? or]) bool
Return KeyVal.val as bool. Optional or value when key is null or unable to parse. Default behavior for null values is to return false. If a number is provided, 0 is false, and everything else is true. If a string is provided, it will be compared to "true". Case-insensitive.
inherited
getKeyValueAsDouble(String key, [double? or]) double
Return KeyVal.val as double. Optional or value when key is null or unable to parse. Default behavior for null values is to return 0.0. Case-insensitive.
inherited
getKeyValueAsInt(String key, [int? or]) int
Return KeyVal.val as int. Optional or value when key is null or unable to parse. Default behavior for null values is to return 0. Case-insensitive.
inherited
hasKey(String key) bool
Returns true if the element has a KeyVal with the same key. Case-insensitive.
inherited
hasKeys(List<String> keys) bool
Returns true if the element has ALL keys of the same key string. Useful for ensuring custom standard elements have all required keyvalues. Case-insensitive.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
upsert(KeyVal kv) → void
Finds and updates KeyVal by its KeyVal.key Inserts if not found or KeyVal.isNameless is true.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited