Type Hierarchy:
Satisfied Interfaces: Category, Cloneable<Map<Key,Item>>, Collection<Key->Item>, Correspondence<Object,Item>, Iterable<Element,Null>, Map<Key,Item>

A Map implementation that wraps an Iterable of entries. All operations, such as lookups, size, etc. are performed on the Iterable.

By: Enrique Zamudio
Initializer
LazyMap({<Key->Item>*} entries)
Attributes
cloneSource Code
shared actual LazyMap<Key,Item> clone

Obtain a clone of this object. For a mutable object, this should return a copy of the object. For an immutable object, it is acceptable to return the object itself.

Refined declaration: clone
firstSource Code

The first element returned by the iterator, if any, of null if the iterable object is empty.

Refined declaration: first
hashSource Code
shared actual default 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.

Refined declaration: hash
lastSource Code

The last element returned by the iterator, if any, of null if the iterable object is empty. Iterable objects are potentially infinite, so calling this might never return; also, this implementation will iterate through all the elements, which might be very time-consuming.

Refined declaration: last
sizeSource Code
shared actual Integer size

The number of elements returned by the iterator of this iterable object, if the iterator terminates. In the case of an iterable whose elements are not countable, this operation never terminates.

Refined declaration: size
Inherited Attributes
Attributes inherited from: Object
Attributes inherited from: Cloneable<Clone>
Attributes inherited from: Collection<Element>
Attributes inherited from: Correspondence<Key,Item>
Attributes inherited from: Iterable<Element,Absent>
Attributes inherited from: Map<Key,Item>
Methods
equalsSource Code
shared actual default Boolean equals(Object that)

Determine if two values are equal. 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.

Refined declaration: equals
getSource Code

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

Refined declaration: get
iteratorSource Code

An iterator for the elements belonging to this container.

Refined declaration: iterator
Inherited Methods
Methods inherited from: Category
Methods inherited from: Correspondence<Key,Item>
Methods inherited from: Iterable<Element,Absent>
Methods inherited from: Map<Key,Item>