@Override public boolean contains(final byte e) { return containsKey(e); }
/** * {@inheritDoc} */ @Override public boolean putIfAbsent(final byte key, final short value) { if (!containsKey(key)) { put(key, value); return true; } return false; }
@Override public int removeAll(final byte e) { final boolean hasKey = this.owner.containsKey(e); int result = 0; if (hasKey) { this.owner.remove(e); result = 1; } return result; }
/** * 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). */ @SuppressWarnings("cast") @Override public short putOrAdd(final byte key, short putValue, final short incrementValue) { if (containsKey(key)) { putValue = get(key); putValue = (short) (((putValue) + (incrementValue))); } put(key, putValue); return putValue; }
final ByteShortCursor c = it.next(); if (!other.containsKey(c.key)) {