Package com.luciad.util
Interface ILcdAssocSet
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
TLcdAssocList
This interface defines methods for managing and using a non-ordered set of
key-value associations.
Each association in the set should have a unique key.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds an association to this set.elements()
Gets the value associated with the given key.boolean
Tests if the set has a value for the given key.keys()
void
Adds an association having with a given value and a given key to this set.Removes the association with the given key.void
Removes all the associations.void
Sets the associations as an array ofILcdAssoc
objects.int
size()
-
Method Details
-
size
int size()- Returns:
- the number of associations in this
ILcdAssocSet
.
-
keys
Enumeration keys()- Returns:
- an enumeration of the keys.
-
elements
Enumeration elements()- Returns:
- an enumeration of the values.
-
put
Adds an association having with a given value and a given key to this set. If an association with the same key already exists, it will be replaced by the given one.- Parameters:
aKey
- the key.aValue
- the value.
-
getAssocs
ILcdAssoc[] getAssocs()- Returns:
- the associations as an array of
ILcdAssoc
objects.
-
setAssocs
Sets the associations as an array ofILcdAssoc
objects. -
add
Adds an association to this set. If an association with the same key already exists, it will be replaced by the given one.- Parameters:
aAssoc
- the association to be added.
-
remove
Removes the association with the given key. If the given association does not exist, no action will be performed.- Parameters:
aKey
- the key of the association to be removed.- Returns:
- the value corresponding to the key, or
null
if the key does not exist.
-
removeAll
void removeAll()Removes all the associations. -
hasValue
Tests if the set has a value for the given key.- Parameters:
aKey
- the key to look up.- Returns:
- true if the given key has a corresponding value, false otherwise.
-
getValue
Gets the value associated with the given key.- Parameters:
aKey
- the key to look up.- Returns:
- the value corresponding to the key, or
null
if the key does not exist.
-
cloneAsILcdAssocSet
ILcdAssocSet cloneAsILcdAssocSet()- Returns:
- a clone of this
ILcdAssocSet
.
-