Developing Apama Applications > Developing Apama Applications in EPL > EPL Methods Quick Reference > dictionary methods
dictionary methods
Method
Result
add(key, item)
Adds an entry to the dictionary.
canParse(string)
When the item type is parseable returns a boolean true if the argument can be successfully parsed to create a dictionary object.
clear()
Sets the size of the dictionary to 0, deleting all entries.
clone()
Returns a new dictionary that is an exact copy.
getOr(key,
alternative)
Returns the item that corresponds to the specified key. If the specified key is not in the dictionary, the getOr() method returns alternative.
getOrDefault(
key)
Retrieves an existing item by its key or returns a default instance of the dictionary's item type if the dictionary does not contain the specified key.
getOrAdd(
key, alternative)
Retrieves an existing item by its key or adds the specified key to the dictionary with alternative as its value if it is not already present and also returns the specified alternative.
getOrAddDefault(
key)
Retrieves an existing item by its key or, if it is not already present, adds the specified key with a default instance of the dictionary's item type and returns that instance.
hasKey(key)
Returns a boolean true if a key exists within the dictionary.
keys()
Returns a sequence of the dictionary’s keys sorted in ascending order.
parse(string)
When the item type is parseable returns the dictionary object represented by the argument.
remove(key)
Removes an entry by key.
size()
Returns as an integer the number of elements in the dictionary.
toString()
Converts the entire dictionary in ascending order of key values to a string.
values()
Returns a sequence of the dictionary’s items sorted in ascending order of keys.
[key]
Retrieves or overwrites an existing item by its key, or creates a new item.
Copyright © 2013 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel and/or their licensors.