Exemple #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);
 }
Exemple #2
0
 /**
  * Removes the specified key from the stringMap and returns the value that was previously there.
  * Returns <code>null</code> if the specified key does not exist.
  */
 private V removeStringValue(String key) {
   return key == null ? removeHashValue(null) : stringMap.remove(key);
 }
Exemple #3
0
 /**
  * Sets the specified key to the specified value in the stringMap. Returns the value previously at
  * that key. Returns <code>null</code> if the specified key did not exist.
  */
 private V putStringValue(String key, V value) {
   return key == null ? putHashValue(null, value) : stringMap.put(key, value);
 }
Exemple #4
0
 /** Returns true if the given key exists in the stringMap. */
 private boolean hasStringValue(String key) {
   return key == null ? hasHashValue(null) : stringMap.contains(key);
 }
Exemple #5
0
 /**
  * Returns the value for the given key in the stringMap. Returns <code>null</code> if the
  * specified key does not exist.
  */
 private V getStringValue(String key) {
   return key == null ? getHashValue(null) : stringMap.get(key);
 }
Exemple #6
0
 @Override
 public boolean containsValue(Object value) {
   return stringMap.containsValue(value) || hashCodeMap.containsValue(value);
 }