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 TypeMethodDescriptionbooleancontainsKey(Object key) booleancontainsValue(Object value) return the element with the given keyprotected abstract IteratorentrySet()booleaninthashCode()booleanisEmpty()protected booleanprotected intprotected IteratorkeySet()voidintsize()protected booleanvalueEquals(Object value1, Object value2) protected intprotected Iteratorvalues()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods 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:
containsValuein interfaceMap
-
containsKey
- Specified by:
containsKeyin interfaceMap
-