Skip to content
Snippets Groups Projects
Commit cd5a0762 authored by felmer's avatar felmer
Browse files

LMS-787 Add remove() method

SVN: 10472
parent 841373a2
No related branches found
No related tags found
No related merge requests found
...@@ -189,6 +189,22 @@ public class TableMap<K, E> implements Iterable<E> ...@@ -189,6 +189,22 @@ public class TableMap<K, E> implements Iterable<E>
{ {
return Collections.unmodifiableSet(map.keySet()); return Collections.unmodifiableSet(map.keySet());
} }
/**
* Removes and returns the row for the specified key.
*
* @return stored row.
*/
public E remove(K key)
{
E row = map.remove(key);
if (row == null)
{
throw new IllegalArgumentException("Couldn't remove row for key '" + key
+ "' because there was no row.");
}
return row;
}
// //
// Object // Object
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment