@Override public short[] toShortArray() { return collection.toShortArray(); } /*
@Override public boolean add(final short k) { synchronized (sync) { return collection.add(k); } } @Override
@Override public boolean addAll(final ShortCollection c) { synchronized (sync) { return collection.addAll(c); } } @Override
@Override public boolean contains(final short k) { synchronized (sync) { return collection.contains(k); } } @Override
@Override public ShortIterator iterator() { return collection.iterator(); } @Override
@Override @Deprecated public boolean remove(final Object k) { synchronized (sync) { return collection.remove(k); } } @Override
@Override public boolean containsAll(final Collection<?> c) { synchronized (sync) { return collection.containsAll(c); } } @Override
@Override public boolean rem(final short k) { synchronized (sync) { return collection.rem(k); } } @Override
@Override public boolean isEmpty() { return collection.isEmpty(); } @Override
@Override public void clear() { synchronized (sync) { collection.clear(); } } @Override
@Override public boolean contains(final short o) { return collection.contains(o); } @Override
/** * Creates a new big-array big list and fills it with a given type-specific * collection. * * @param c * a type-specific collection that will be used to fill the array * list. */ public ShortBigArrayBigList(final ShortCollection c) { this(c.size()); for (ShortIterator i = c.iterator(); i.hasNext();) add(i.nextShort()); } /**
@Override public ShortIterator iterator() { return ShortIterators.unmodifiable(collection.iterator()); } @Override
/** * {@inheritDoc} * * @deprecated Please use the corresponding type-specific method instead. */ @Deprecated @Override default boolean remove(final Object key) { return ShortCollection.super.remove(key); } /**
@Override public boolean containsAll(final ShortCollection c) { synchronized (sync) { return collection.containsAll(c); } } @Override
@Override public boolean remove(final short k) { synchronized (sync) { return collection.rem(k); } } @Deprecated
@Override public boolean isEmpty() { synchronized (sync) { return collection.isEmpty(); } } @Override
@Override public boolean removeAll(final ShortCollection c) { final short[] a = this.a; int j = 0; for (int i = 0; i < size; i++) if (!c.contains(a[i])) a[j++] = a[i]; final boolean modified = size != j; size = j; return modified; } @Override
@Override public short[] toShortArray() { synchronized (sync) { return collection.toShortArray(); } } @Override