@Override public void add(final long i, final boolean k) { synchronized (sync) { list.add(i, k); } } @Override
@Override public boolean getBoolean(final long i) { synchronized (sync) { return list.getBoolean(i); } } @Override
@Override public boolean removeBoolean(final long i) { synchronized (sync) { return list.removeBoolean(i); } } @Override
/** * Creates a new big-array big list and fills it with a given type-specific * list. * * @param l * a type-specific list that will be used to fill the array list. */ public BooleanBigArrayBigList(final BooleanBigList l) { this(l.size64()); l.getElements(0, a, 0, size = l.size64()); } /**
/** * Shuffles the specified big list using the specified pseudorandom number * generator. * * @param l * the big list to be shuffled. * @param random * a pseudorandom number generator. * @return {@code l}. */ public static BooleanBigList shuffle(final BooleanBigList l, final Random random) { for (long i = l.size64(); i-- != 0;) { final long p = (random.nextLong() & 0x7FFFFFFFFFFFFFFFL) % (i + 1); final boolean t = l.getBoolean(i); l.set(i, l.getBoolean(p)); l.set(p, t); } return l; } /**
@Override public boolean set(final long i, final boolean k) { synchronized (sync) { return list.set(i, k); } } @Override
@Override public long size64() { synchronized (sync) { return list.size64(); } } @Override
@Deprecated @Override public void size(final long size) { synchronized (sync) { list.size(size); } } @Override
@Override public BooleanBigList subList(final long from, final long to) { synchronized (sync) { return synchronize(list.subList(from, to), sync); } } @Override
@Override public boolean addAll(final long index, final BooleanCollection c) { synchronized (sync) { return list.addAll(index, c); } } @Override
@Override public void addElements(long index, final boolean a[][], long offset, long length) { synchronized (sync) { list.addElements(index, a, offset, length); } } @Override
@Override public int compareTo(final BigList<? extends Boolean> o) { synchronized (sync) { return list.compareTo(o); } } @Override
/** * {@inheritDoc} * * @deprecated Please use the corresponding type-specific method instead. */ @Deprecated @Override public Boolean set(final long index, Boolean k) { synchronized (sync) { return list.set(index, k); } } /**
@Deprecated @Override public void size(final long size) { list.size(size); } @Override
@Override public BooleanBigList subList(final long from, final long to) { return unmodifiable(list.subList(from, to)); } @Override
@Override public boolean addAll(BooleanBigList l) { synchronized (sync) { return list.addAll(l); } } /**
@Override public void addElements(long index, final boolean a[][]) { synchronized (sync) { list.addElements(index, a); } } /*
@Override public int compareTo(final BigList<? extends Boolean> o) { return list.compareTo(o); } @Override
@Override public boolean getBoolean(final long i) { return list.getBoolean(i); } @Override