Package org.biojava.nbio.ontology.utils
Class SmallMap
java.lang.Object
java.util.AbstractMap
org.biojava.nbio.ontology.utils.SmallMap
- All Implemented Interfaces:
 Serializable,Map
Lightweight implementation of Map which uses little memory to store a
 small number of mappings, at the expense of scalability.  Not recommended
 for more than 20-30 mappings.
 
This implementation has the useful property that the iteration order is the same as the order in which mappings are added.
- Author:
 - Thomas Down, Len Trigg
 - See Also:
 
- 
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object>  - 
Constructor Summary
Constructors - 
Method Summary
Methods inherited from class java.util.AbstractMap
clear, clone, containsValue, equals, hashCode, isEmpty, putAll, remove, toString, valuesMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll 
- 
Constructor Details
- 
SmallMap
public SmallMap() - 
SmallMap
public SmallMap(int size)  - 
SmallMap
 
 - 
 - 
Method Details
- 
get
- Specified by:
 getin interfaceMap- Overrides:
 getin classAbstractMap- Throws:
 NullPointerException- if key is null
 - 
put
- Specified by:
 putin interfaceMap- Overrides:
 putin classAbstractMap- Throws:
 NullPointerException- if key is null
 - 
keySet
- Specified by:
 keySetin interfaceMap- Overrides:
 keySetin classAbstractMap
 - 
entrySet
- Specified by:
 entrySetin interfaceMap- Specified by:
 entrySetin classAbstractMap
 - 
size
public int size()- Specified by:
 sizein interfaceMap- Overrides:
 sizein classAbstractMap
 - 
containsKey
- Specified by:
 containsKeyin interfaceMap- Overrides:
 containsKeyin classAbstractMap
 
 -