Package org.yamcs.utils
Class IndexedList<K,V>
java.lang.Object
org.yamcs.utils.IndexedList<K,V>
- All Implemented Interfaces:
Iterable<V>
List which is indexed by a key in addition to its natural integer index
Does not allow removal
-
Field Details
-
values
-
keys
-
-
Constructor Details
-
IndexedList
public IndexedList() -
IndexedList
-
IndexedList
public IndexedList(int size)
-
-
Method Details
-
add
-
getIndex
returns the index of the element with key or -1 if there is no such element- Parameters:
key
-- Returns:
- returns the index of the element with key or -1 if there is no such element
-
hasKey
- Parameters:
key
-- Returns:
- true if the list contains the key
-
get
Returns the value mapped to the key or null if there is no such element- Parameters:
key
-- Returns:
-
get
- Parameters:
idx
-- Returns:
- See Also:
-
iterator
-
size
public int size()- Returns:
- returns the size of the list.
-
changeKey
-
getList
-
set
-
toString
-