public void forEach(Consumer<? super Long> action) { if (action == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return; int mc = modCount(); long free = freeValue; long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) != free) { action.accept(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
public String setToString() { if (this.isEmpty()) return "[]"; StringBuilder sb = new StringBuilder(); int elementCount = 0; int mc = modCount(); long free = freeValue; long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) != free) { sb.append(' ').append(key).append(','); if (++elementCount == 8) { int expectedLength = sb.length() * (size() / 8); sb.ensureCapacity(expectedLength + (expectedLength / 2)); } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); sb.setCharAt(0, '['); sb.setCharAt(sb.length() - 1, ']'); return sb.toString(); }
public void forEach(LongConsumer action) { if (action == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return; int mc = modCount(); long free = freeValue; long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) != free) { action.accept(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
public String setToString() { if (this.isEmpty()) return "[]"; StringBuilder sb = new StringBuilder(); int elementCount = 0; int mc = modCount(); long free = freeValue; long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) != free) { sb.append(' ').append(key).append(','); if (++elementCount == 8) { int expectedLength = sb.length() * (size() / 8); sb.ensureCapacity(expectedLength + (expectedLength / 2)); } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); sb.setCharAt(0, '['); sb.setCharAt(sb.length() - 1, ']'); return sb.toString(); }
public void forEach(LongConsumer action) { if (action == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return; int mc = modCount(); long free = freeValue; long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) != free) { action.accept(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
public void forEach(Consumer<? super Long> action) { if (action == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return; int mc = modCount(); long free = freeValue; long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) != free) { action.accept(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
public boolean reverseAddAllTo(LongCollection c) { if (this.isEmpty()) return false; boolean changed = false; int mc = modCount(); long free = freeValue; long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) != free) { changed |= c.add(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
public boolean reverseAddAllTo(LongCollection c) { if (this.isEmpty()) return false; boolean changed = false; int mc = modCount(); long free = freeValue; long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) != free) { changed |= c.add(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
public boolean allContainingIn(LongCollection c) { if (this.isEmpty()) return true; boolean containsAll = true; int mc = modCount(); long free = freeValue; long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) != free) { if (!c.contains(key)) { containsAll = false; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return containsAll; }
public boolean allContainingIn(LongCollection c) { if (this.isEmpty()) return true; boolean containsAll = true; int mc = modCount(); long free = freeValue; long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) != free) { if (!c.contains(key)) { containsAll = false; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return containsAll; }
public boolean forEachWhile( LongPredicate predicate) { if (predicate == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return true; boolean terminated = false; int mc = modCount(); long free = freeValue; long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) != free) { if (!predicate.test(key)) { terminated = true; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return !terminated; }
public boolean forEachWhile( LongPredicate predicate) { if (predicate == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return true; boolean terminated = false; int mc = modCount(); long free = freeValue; long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) != free) { if (!predicate.test(key)) { terminated = true; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return !terminated; }
public boolean reverseRemoveAllFrom(LongSet s) { if (this.isEmpty() || s.isEmpty()) return false; boolean changed = false; int mc = modCount(); long free = freeValue; long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) != free) { changed |= s.removeLong(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
public boolean reverseRemoveAllFrom(LongSet s) { if (this.isEmpty() || s.isEmpty()) return false; boolean changed = false; int mc = modCount(); long free = freeValue; long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) != free) { changed |= s.removeLong(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
public boolean removeIf(Predicate<? super Long> filter) { if (filter == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return false; boolean changed = false;
boolean removeAll(@Nonnull HashLongSet thisC, @Nonnull LongCollection c) { if (thisC == (Object) c) throw new IllegalArgumentException(); if (this.isEmpty() || c.isEmpty()) return false; boolean changed = false;
private boolean retainAll(@Nonnull HashLongSet thisC, @Nonnull LongCollection c) { if (thisC == (Object) c) throw new IllegalArgumentException(); if (this.isEmpty()) return false; if (c.isEmpty()) {
public boolean removeIf(Predicate<? super Long> filter) { if (filter == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return false; boolean changed = false;
private boolean retainAll(@Nonnull HashLongSet thisC, @Nonnull LongCollection c) { if (thisC == (Object) c) throw new IllegalArgumentException(); if (this.isEmpty()) return false; if (c.isEmpty()) {
public boolean removeIf(LongPredicate filter) { if (filter == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return false; boolean changed = false;