public boolean contains(int value) { return super.containsKey(value); }
public boolean contains(int value) { return super.containsKey(value); }
@Override public boolean contains(int e) { return owner.containsKey(e); }
@Override public int removeAll(final int e) { final boolean hasKey = owner.containsKey(e); if (hasKey) { owner.remove(e); return 1; } else { return 0; } } };
/** * Return true if all keys of some other container exist in this container. */ protected boolean equalElements(IntIntHashMap other) { if (other.size() != size()) { return false; } for (IntIntCursor c : other) { int key = c.key; if (!containsKey(key) || !((get(key)) == (c.value))) { return false; } } return true; }
public boolean containsKey(int key) { return g_map.containsKey(key); }
@Override public boolean contains(int e) { return owner.containsKey(e); }
public boolean contains(int value) { return super.containsKey(value); }
@Override public int removeAll(final int e) { final boolean hasKey = owner.containsKey(e); if (hasKey) { owner.remove(e); return 1; } else { return 0; } } };
/** * <a href="http://trove4j.sourceforge.net">Trove</a>-inspired API method. An equivalent * of the following code: * <pre> * if (!map.containsKey(key)) map.put(value); * </pre> * * @param key The key of the value to check. * @param value The value to put if <code>key</code> does not exist. * @return <code>true</code> if <code>key</code> did not exist and <code>value</code> * was placed in the map. */ public boolean putIfAbsent(int key, int value) { if (!containsKey(key)) { put(key, value); return true; } else { return false; } }
/** * If <code>key</code> exists, <code>putValue</code> is inserted into the map, * otherwise any existing value is incremented by <code>additionValue</code>. * * @param key * The key of the value to adjust. * @param putValue * The value to put if <code>key</code> does not exist. * @param incrementValue * The value to add to the existing value if <code>key</code> exists. * @return Returns the current value associated with <code>key</code> (after * changes). */ @Override public int putOrAdd(int key, int putValue, int incrementValue) { assert assigned < mask + 1; if (containsKey(key)) { putValue = get(key); putValue = (int) (((putValue) + (incrementValue))); } put(key, putValue); return putValue; }
/** * Return true if all keys of some other container exist in this container. */ protected boolean equalElements(IntIntHashMap other) { if (other.size() != size()) { return false; } for (IntIntCursor c : other) { int key = c.key; if (!containsKey(key) || !((get(key)) == (c.value))) { return false; } } return true; }
/** Called by {@link #normalizeIndices()}. */ private void remapGapIndices(IntIntHashMap map, int[] lastIndex, CTNode curr) { int gapIndex = curr.getGappingRelationIndex(); if (map.containsKey(gapIndex)) { curr.setGappingRelationIndex(map.get(gapIndex)); } else if (gapIndex != -1) { curr.setGappingRelationIndex(lastIndex[0]); map.put(gapIndex, lastIndex[0]++); } for (CTNode child : curr.getChildrenList()) remapGapIndices(map, lastIndex, child); }
if (oldLocalToFirst.containsKey(var)) { final ValueHolderSub sub = oldToNew.get(oldLocalToFirst.get(var)); if (sub.iden() == from.iden()) {