Package org.jruby.util
Class GenericMap
java.lang.Object
org.jruby.util.GenericMap
- All Implemented Interfaces:
Map
- Direct Known Subclasses:
WeakIdentityHashMap
A
GenericMap
is simply an abstract java.util.Map
implementation for which subclasses really only need to implement
the method entryIterator.- Author:
- Kresten Krab Thorup ([email protected])
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
containsKey
(Object key) boolean
containsValue
(Object value) return the element with the given keyprotected abstract Iterator
entrySet()
boolean
int
hashCode()
boolean
isEmpty()
protected boolean
protected int
protected Iterator
keySet()
void
int
size()
protected boolean
valueEquals
(Object value1, Object value2) protected int
protected Iterator
values()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, forEach, get, getOrDefault, merge, put, putIfAbsent, remove, remove, replace, replace, replaceAll
-
Field Details
-
size
protected int size
-
-
Constructor Details
-
GenericMap
public GenericMap()
-
-
Method Details
-
size
public int size() -
isEmpty
public boolean isEmpty() -
keyHash
-
keyEquals
-
valueHash
-
valueEquals
-
putAll
-
entryIterator
-
keyIterator
-
valueIterator
-
values
-
keySet
-
hashCode
public int hashCode() -
equals
-
entrySet
-
containsValue
return the element with the given key- Specified by:
containsValue
in interfaceMap
-
containsKey
- Specified by:
containsKey
in interfaceMap
-