![]() | Force-FrameworkMark Brennand |
| Description | Class providing the Collections API implementation. Use these classes to create and manage immutable Lists, Sets and Maps. List and Set functionality is combined and provided by the Collection interface. See README for full details of the Collection API. Copyright (c) 2025 Mark Brennand, released under MIT License. |
|---|---|
| Author | Mark Brennand |
| Description | Creates an immutable Map from the given source Map. The key to the Map is of an unknown type. |
|---|---|
| Parameter | source: The source Map. |
| Returns | The immutable Map. |
| Description | Creates an immutable Map from the given source Map. The key to the Map is an SObject Id. |
|---|---|
| Parameter | source: The source Map. |
| Returns | The immutable Map. |
| Description | Creates an immutable Map from the given source Map. The key to the Map is a String. |
|---|---|
| Parameter | source: The source Map. |
| Returns | The immutable Map. |
| Description | Creates an immutable List from the given Iterable. |
|---|---|
| Parameter | source: The Iterable. |
| Returns | The immutable List. |
| Description | Exception thrown when an operation in the Immutable API fails. |
|---|
| Description | Interface for List and Set that supports conversion to a List and the functionality of the ArrayV1.Methods interface. A ReadOnlyMap or ReadyOnlySet may have reduce(), filter(), transform() etc. called on it. |
|---|
| Description | Determines whether collection contains the given object. |
|---|---|
| Parameter | element: The object to be checked. |
| Returns | True if the collection contains the object, false if not. |
| Description | Determines whether the collection contains all the objects in the Iterable argument. |
|---|---|
| Parameter | objs: The objects to be matched. |
| Returns | True if the collection contains all the objects, false if not. |
| Description | Retrieves the element at the given index in the List. |
|---|---|
| Parameter | index: The positional index. |
| Returns | The element. |
| Description | Finds the positional index in the List of the given object. |
|---|---|
| Parameter | element: The object to find. |
| Returns | The positional index, or -1 if not found. |
| Description | Checks if the collection is empty. |
|---|---|
| Returns | True if the collection is empty, otherwise false. |
| Description | Returns the number of elements in the collection. |
|---|---|
| Returns | The number of elements in the collection. |
| Description | Converts the contents of a collection to a List. The collection's elements will be added to the List passed as argument. This method allows a List of a specific type to be populated from a collection. |
|---|---|
| Parameter | result: The List to be populated. |
| Returns | The populated List. |
| Description | Converts the contents of a collection to a List. The returned List will be of type Object. This will prevent it being cast to a List of any other type, even if the List contains that type. |
|---|---|
| Returns | The collection's contents as a List. |
| Description | An immutable Map. It has all the accessor functionality of a Map but has had the update capability removed. It provides one item of functionality not present in a Map, iteration over the implementation, the Objects returned by the Iterator will be the Map's keys. |
|---|
| Description | Checks if the map contains the specified key. |
|---|---|
| Parameter | key: The key to check |
| Returns | True if the map contains the key, false otherwise |
| Description | Retrieves the value associated with the specified key. |
|---|---|
| Parameter | key: The key whose associated value is to be returned. |
| Returns | The value associated with the key, or null if the key is not found. |
| Description | Returns the keys to the Map's elements. |
|---|---|
| Returns | The keys. |
| Description | Returns the number of keys in the Map. |
|---|---|
| Returns | The number of keys in the Map. |
| Description | Returns a List of the values stored in the Map. |
|---|---|
| Returns | The values. |