%Library.AbstractSet
hidden abstract class %Library.AbstractSet extends %Library.Base
Abstract Set defines a set interface. Members of a Set can be anonymous or named.
This interface does not define how the set is implemented and maintained.
Method Inventory
- %DispatchMethod()
- add()
- addAll()
- apply()
- clear()
- contains()
- containsAll()
- get()
- iterator()
- put()
- putAll()
- putAllIfAbsent()
- putIfAbsent()
- remove()
- removeAll()
- removeIf()
- rename()
- replace()
- replaceAll()
- size()
- toDao()
- toString()
Methods
add value to the set.
It is left to the implementation to decide whether duplicates are allowed (multiset) or not (proper set).
parameters:
- value: value to add to the set
returns:
- oref referencing the modified set
throws:
- exception
parameters:
- values: array of values to add to the set
returns:
- oref referencing the modified set
throws:
- exception
put the value into the set with the element name (id) of key. If an element with this key is already present in the set then that element's value is replaced by value
parameters:
- key: key to put into the set
- value: value to put into the set
returns:
- oref referencing the modified set
throws:
- exception
put all {keys[n], values[n]} elements where 0≤n≤ size(keys) into the set
parameters:
- keys: array of keys to put into the set
- values: array of values to put into the set
returns:
- oref referencing the modified set
throws:
- exception
put all {keys[n], values[n]} elements where 0≤n≤ size(keys) and keys[n] is not already associated with a value in the set.
parameters:
- keys: array of keys to be put into the set
- values: array of values to be put into the set
returns:
- oref referencing the modified set
throws:
- exception
put the {key, value} element into the set. If contains(key) is false or get(key) is null then put(key,value)
parameters:
- key: key to put into the set
- value: value to put into the set
- oref referencing the modified set
throws:
- exception
remove the element identified by key from the set
parameters:
- key: key of element to be removed from the set
returns:
- the removed element or null if that element doesn't exist
throws:
- exception
remove all elements identified by keys[n] where 0≤n≤ size(keys) from the set
parameters:
- keys: array of keys to be removed from the set
returns:
- array of removed elements (null element if key doesn't exist)
throws:
- exception
parameters:
- expression: elements matching expression are to be removed
returns:
- array of removed elements (null element if key doesn't exist)
throws:
- exception
parameters:
- currentKey - current key of the element to be renamed
- newKey - new key to assign to the element
- the current key if the element exists, null otherwise
throws:
- exception
parameters:
- key - key of the element to be replaced
- value - new value of the element
- return the previous value of the element
throws:
- exception
parameters:
- keys: array of keys of the elements to be replaced
- values: array of values of the elements
returns:
- array of previous element values
throws:
- exception
The toDao() method casts the set to a DAO.
The toString() method returns the contents of a set as a string.