public void forEach(Consumer<? super E> action) { if (action == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); Object[] tab = table; if (noRemoved()) { for (int i = tab.length - 2; i >= 0; i -= 2) { E key; // noinspection unchecked if ((key = (E) (E) tab[i]) != FREE) { action.accept(key); } } } else { for (int i = tab.length - 2; i >= 0; i -= 2) { E key; // noinspection unchecked if ((key = (E) (E) tab[i]) != FREE && key != REMOVED) { action.accept(key); } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
public ObjCursor<E> setCursor() { int mc = modCount(); if (!noRemoved()) return new SomeRemovedCursor(mc); return new NoRemovedCursor(mc); }
int mc = modCount(); Object[] tab = table; if (noRemoved()) { for (int i = tab.length - 2; i >= 0; i -= 2) { E key;
public ObjIterator<E> iterator() { int mc = modCount(); if (!noRemoved()) return new SomeRemovedIterator(mc); return new NoRemovedIterator(mc); }
public ObjIterator<E> iterator() { int mc = modCount(); if (!noRemoved()) return new SomeRemovedIterator(mc); return new NoRemovedIterator(mc); }
public ObjCursor<E> setCursor() { int mc = modCount(); if (!noRemoved()) return new SomeRemovedCursor(mc); return new NoRemovedCursor(mc); }
int mc = modCount(); Object[] tab = table; if (noRemoved()) { for (int i = tab.length - 2; i >= 0; i -= 2) { E key;
@Nonnull public Object[] toArray() { int size = size(); Object[] result = new Object[size]; if (size == 0) return result; int resultIndex = 0; int mc = modCount(); Object[] tab = table; if (noRemoved()) { for (int i = tab.length - 2; i >= 0; i -= 2) { E key; // noinspection unchecked if ((key = (E) (E) tab[i]) != FREE) { result[resultIndex++] = key; } } } else { for (int i = tab.length - 2; i >= 0; i -= 2) { E key; // noinspection unchecked if ((key = (E) (E) tab[i]) != FREE && key != REMOVED) { result[resultIndex++] = key; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return result; }
int mc = modCount(); Object[] tab = table; if (noRemoved()) { for (int i = tab.length - 2; i >= 0; i -= 2) { E key;
@Nonnull public Object[] toArray() { int size = size(); Object[] result = new Object[size]; if (size == 0) return result; int resultIndex = 0; int mc = modCount(); Object[] tab = table; if (noRemoved()) { for (int i = tab.length - 2; i >= 0; i -= 2) { E key; // noinspection unchecked if ((key = (E) (E) tab[i]) != FREE) { result[resultIndex++] = key; } } } else { for (int i = tab.length - 2; i >= 0; i -= 2) { E key; // noinspection unchecked if ((key = (E) (E) tab[i]) != FREE && key != REMOVED) { result[resultIndex++] = key; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return result; }
public int setHashCode() { int hashCode = 0; int mc = modCount(); Object[] tab = table; if (noRemoved()) { for (int i = tab.length - 2; i >= 0; i -= 2) { E key; // noinspection unchecked if ((key = (E) (E) tab[i]) != FREE) { hashCode += nullableKeyHashCode(key); } } } else { for (int i = tab.length - 2; i >= 0; i -= 2) { E key; // noinspection unchecked if ((key = (E) (E) tab[i]) != FREE && key != REMOVED) { hashCode += nullableKeyHashCode(key); } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return hashCode; }
public int setHashCode() { int hashCode = 0; int mc = modCount(); Object[] tab = table; if (noRemoved()) { for (int i = tab.length - 2; i >= 0; i -= 2) { E key; // noinspection unchecked if ((key = (E) (E) tab[i]) != FREE) { hashCode += nullableKeyHashCode(key); } } } else { for (int i = tab.length - 2; i >= 0; i -= 2) { E key; // noinspection unchecked if ((key = (E) (E) tab[i]) != FREE && key != REMOVED) { hashCode += nullableKeyHashCode(key); } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return hashCode; }
public void forEach(Consumer<? super E> action) { if (action == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); Object[] tab = table; if (noRemoved()) { for (int i = tab.length - 2; i >= 0; i -= 2) { E key; // noinspection unchecked if ((key = (E) (E) tab[i]) != FREE) { action.accept(key); } } } else { for (int i = tab.length - 2; i >= 0; i -= 2) { E key; // noinspection unchecked if ((key = (E) (E) tab[i]) != FREE && key != REMOVED) { action.accept(key); } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
int mc = modCount(); Object[] tab = table; if (noRemoved()) { for (int i = tab.length - 2; i >= 0; i -= 2) { E key;
public boolean reverseAddAllTo(ObjCollection<? super E> c) { if (isEmpty()) return false; boolean changed = false; int mc = modCount(); Object[] tab = table; if (noRemoved()) { for (int i = tab.length - 2; i >= 0; i -= 2) { E key; // noinspection unchecked if ((key = (E) (E) tab[i]) != FREE) { changed |= c.add(key); } } } else { for (int i = tab.length - 2; i >= 0; i -= 2) { E key; // noinspection unchecked if ((key = (E) (E) tab[i]) != FREE && key != REMOVED) { changed |= c.add(key); } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
public boolean reverseAddAllTo(ObjCollection<? super E> c) { if (isEmpty()) return false; boolean changed = false; int mc = modCount(); Object[] tab = table; if (noRemoved()) { for (int i = tab.length - 2; i >= 0; i -= 2) { E key; // noinspection unchecked if ((key = (E) (E) tab[i]) != FREE) { changed |= c.add(key); } } } else { for (int i = tab.length - 2; i >= 0; i -= 2) { E key; // noinspection unchecked if ((key = (E) (E) tab[i]) != FREE && key != REMOVED) { changed |= c.add(key); } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
int mc = modCount(); Object[] tab = table; if (noRemoved()) { for (int i = tab.length - 2; i >= 0; i -= 2) { E key;
int mc = modCount(); Object[] tab = table; if (noRemoved()) { for (int i = tab.length - 2; i >= 0; i -= 2) { E key;
public boolean reverseRemoveAllFrom(ObjSet<?> s) { if (isEmpty() || s.isEmpty()) return false; boolean changed = false; int mc = modCount(); Object[] tab = table; if (noRemoved()) { for (int i = tab.length - 2; i >= 0; i -= 2) { E key; // noinspection unchecked if ((key = (E) (E) tab[i]) != FREE) { changed |= s.remove(key); } } } else { for (int i = tab.length - 2; i >= 0; i -= 2) { E key; // noinspection unchecked if ((key = (E) (E) tab[i]) != FREE && key != REMOVED) { changed |= s.remove(key); } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
public boolean reverseRemoveAllFrom(ObjSet<?> s) { if (isEmpty() || s.isEmpty()) return false; boolean changed = false; int mc = modCount(); Object[] tab = table; if (noRemoved()) { for (int i = tab.length - 2; i >= 0; i -= 2) { E key; // noinspection unchecked if ((key = (E) (E) tab[i]) != FREE) { changed |= s.remove(key); } } } else { for (int i = tab.length - 2; i >= 0; i -= 2) { E key; // noinspection unchecked if ((key = (E) (E) tab[i]) != FREE && key != REMOVED) { changed |= s.remove(key); } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }