Initializer
Object({<String->Value>*} values = ...)
Parameters:
  • values = {}
Attributes
hashSource Codeshared actual Integer hash

The hash value of the value, which allows the value to be an element of a hash-based set or key of a hash-based map. Implementations must respect the constraint that:

  • if x==y then x.hash==y.hash.

Therefore, a class which refines equals must also refine hash.

In general, hash values vary between platforms and between executions of the same program.

Note that when executing on a Java Virtual Machine, the 64-bit Integer value returned by an implementation of hash is truncated to a 32-bit integer value by taking the exclusive disjunction of the 32 lowest-order bits with the 32 highest-order bits, before returning the value to the caller.

Refines Identifiable.hash ultimately refines Object.hash
prettySource Codeshared String pretty

Returns a pretty-printed serialised JSON representation

sizeSource Codeshared actual Integer size

The number of elements returned by the iterator of this stream, if the iterator terminates. In the case of an infinite stream, this operation never terminates.

stringSource Codeshared actual String string

Returns a serialised JSON representation

Refines Collection.string ultimately refines Object.string
Inherited Attributes
Attributes inherited from: LangObject
Attributes inherited from: Collection<Element>
Attributes inherited from: Correspondence<Key,Item>
Attributes inherited from: Iterable<Element,Absent>
Attributes inherited from: Map<Key,Item>
Methods
clearSource Codeshared actual void clear()

Remove every entry from this map, leaving an empty map with no entries.

cloneSource Codeshared actual Object clone()

A shallow copy of this collection, that is, a collection with identical elements which does not change if this collection changes. If this collection is immutable, it is acceptable to return a reference to this collection. If this collection is mutable, a newly instantiated collection must be returned.

Refines MutableMap.clone ultimately refines Collection.clone
definesSource Codeshared actual Boolean defines(LangObject key)

Determines if there is a value defined for the given key.

Refines Map.defines ultimately refines Correspondence.defines
equalsSource Codeshared actual Boolean equals(LangObject that)

Determine if two values are equal.

For any two non-null objects x and y, x.equals(y) may be written as:

x == y 

Implementations should respect the constraints that:

  • if x===y then x==y (reflexivity),
  • if x==y then y==x (symmetry),
  • if x==y and y==z then x==z (transitivity).

Furthermore it is recommended that implementations ensure that if x==y then x and y have the same concrete class.

A class which explicitly refines equals() is said to support value equality, and the equality operator == is considered much more meaningful for such classes than for a class which simply inherits the default implementation of identity equality from Identifiable.

Note that an implementation of equals() that always returns false does satisfy the constraints given above. Therefore, in very rare cases where there is no reasonable definition of value equality for a class, for example, function references (Callable), it is acceptable for equals() to be defined to return false for every argument.

Refines Identifiable.equals ultimately refines Object.equals
getSource Codeshared actual Value get(LangObject key)

Returns the value defined for the given key, or null if there is no value defined for the given key.

For any instance c of Correspondence, c.get(key) may be written using the item operator:

c[key]
Refines Map.get ultimately refines Correspondence.get
getArraySource Codeshared Array getArray(String key)

Returns an Array value.

Throws
getArrayOrNullSource Codeshared Array? getArrayOrNull(String key)

Returns an Array value, unless the key does not exist, or the value is null.

Throws
getBooleanSource Codeshared Boolean getBoolean(String key)

Returns an Boolean value.

Throws
getBooleanOrNullSource Codeshared Boolean? getBooleanOrNull(String key)

Returns an Boolean value, unless the key does not exist, or the value is null.

Throws
getFloatSource Codeshared Float getFloat(String key)

Returns an Float value.

Throws
getFloatOrNullSource Codeshared Float? getFloatOrNull(String key)

Returns an Float value, unless the key does not exist, or the value is null.

Throws
getIntegerSource Codeshared Integer getInteger(String key)

Returns an Integer value.

Throws
getIntegerOrNullSource Codeshared Integer? getIntegerOrNull(String key)

Returns an Integer value, unless the key does not exist, or the value is null.

Throws
getObjectSource Codeshared Object getObject(String key)

Returns an Object value.

Throws
getObjectOrNullSource Codeshared Object? getObjectOrNull(String key)

Returns an Object value, unless the key does not exist, or the value is null.

Throws
getStringSource Codeshared String getString(String key)

Returns an String value.

Throws
getStringOrNullSource Codeshared String? getStringOrNull(String key)

Returns an String value, unless the key does not exist, or the value is null.

Throws
iteratorSource Codeshared actual Iterator<String->Value> iterator()

An iterator for the elements belonging to this stream.

If this is a nonempty stream with type {Element+}, the iterator must produce at least one element.

putSource Codeshared actual Value put(String key, Value item)

Set the item associated with the given key to the given item. If there is already an item associated with this key, replace the association. Otherwise, create a new association.

For any instance c of KeyedCorrespondenceMutator, c.put(key, item) may be written using the item and assignment operators:

c[key] = item
putAllSource Codeshared actual void putAll({<String->Value>*} entries)

Add the given entries to this map, overwriting any existing entries with the same keys.

removeSource Codeshared actual Value remove(String key)

Remove the entry associated with the given key, if any, from this map, returning the value no longer associated with the given key, if any, or null if there was no entry associated with the given key.

Refines MutableMap.remove ultimately refines MapMutator.remove
Inherited Methods
Methods inherited from: LangObject
Methods inherited from: Category<Element>
Methods inherited from: Collection<Element>
Methods inherited from: Correspondence<Key,Item>
Methods inherited from: Iterable<Element,Absent>
Methods inherited from: KeyedCorrespondenceMutator<Key,Item>
Methods inherited from: Map<Key,Item>
Methods inherited from: MapMutator<Key,Item>
Methods inherited from: MutableMap<Key,Item>