/** * {@inheritDoc} */ public boolean removeAll(final Collection<?> coll) { boolean removed = false; for (final Object value : coll) { removed |= remove(value); } return removed; }
public void onDisconnect(final long sessionId) { currentlyAuthenticatedSessionIds.remove(sessionId); }
/** * Alias for {@link #removeAll(Collection)} for the specialized case when removing another LongHashSet, * avoids boxing and allocations * * @param coll containing the values to be removed. * @return <tt>true</tt> if this set changed as a result of the call */ public boolean removeAll(final LongHashSet coll) { boolean acc = false; final long missingValue = coll.missingValue; for (final long value : coll.values) { if (value != missingValue) { acc |= remove(value); } } return acc; }
/** * {@inheritDoc} */ public boolean remove(final Object value) { return value instanceof Long && remove(((Long)value).longValue()); }
/** * Alias for {@link #removeAll(Collection)} for the specialized case when removing another LongHashSet, * avoids boxing and allocations * * @param coll containing the values to be removed. * @return {@code true} if this set changed as a result of the call */ public boolean removeAll(final LongHashSet coll) { boolean acc = false; for (final long value : coll.values) { if (value != MISSING_VALUE) { acc |= remove(value); } } if (coll.containsMissingValue) { acc |= remove(MISSING_VALUE); } return acc; }
/** * {@inheritDoc} */ public boolean remove(final Object value) { return value instanceof Long && remove(((Long)value).longValue()); }
if (!sessionIds.remove(sessionId))