Beispiel #1
0
 private void reset() {
   InternalJsMapFactory factory = GWT.create(InternalJsMapFactory.class);
   hashCodeMap = factory.createJsHashCodeMap();
   hashCodeMap.host = this;
   stringMap = factory.createJsStringMap();
   stringMap.host = this;
   size = 0;
   structureChanged(this);
 }
Beispiel #2
0
 /**
  * Removes the pair whose key is Object equal to <code>key</code> from <code>hashCodeMap</code>,
  * provided that <code>key</code>'s hash code is <code>hashCode</code>. Returns the value that was
  * associated with the removed key, or null if no such key existed.
  */
 private V removeHashValue(Object key) {
   return hashCodeMap.remove(key);
 }
Beispiel #3
0
 /**
  * Sets the specified key to the specified value in the hashCodeMap. Returns the value previously
  * at that key. Returns <code>null</code> if the specified key did not exist.
  */
 private V putHashValue(K key, V value) {
   return hashCodeMap.put(key, value);
 }
Beispiel #4
0
 /**
  * Returns true if the a key exists in the hashCodeMap that is Object equal to <code>key</code>,
  * provided that <code>key</code>'s hash code is <code>hashCode</code>.
  */
 private boolean hasHashValue(Object key) {
   return hashCodeMap.getEntry(key) != null;
 }
Beispiel #5
0
 /**
  * Returns the Map.Entry whose key is Object equal to <code>key</code>, provided that <code>key
  * </code>'s hash code is <code>hashCode</code>; or <code>null</code> if no such Map.Entry exists
  * at the specified hashCode.
  */
 private V getHashValue(Object key) {
   return getEntryValueOrNull(hashCodeMap.getEntry(key));
 }
Beispiel #6
0
 @Override
 public boolean containsValue(Object value) {
   return stringMap.containsValue(value) || hashCodeMap.containsValue(value);
 }