// 
// Decompiled by Procyon v0.6.0
// 

package it.unimi.dsi.fastutil.booleans;

import java.util.Iterator;
import java.util.Spliterator;
import java.util.Objects;
import java.util.function.Predicate;
import it.unimi.dsi.fastutil.Size64;
import java.util.Collection;

public interface BooleanCollection extends Collection<Boolean>, BooleanIterable
{
    BooleanIterator iterator();
    
    default BooleanSpliterator spliterator() {
        return BooleanSpliterators.asSpliterator(this.iterator(), Size64.sizeOf(this), 320);
    }
    
    boolean add(final boolean p0);
    
    boolean contains(final boolean p0);
    
    boolean rem(final boolean p0);
    
    @Deprecated
    default boolean add(final Boolean key) {
        return this.add((boolean)key);
    }
    
    @Deprecated
    default boolean contains(final Object key) {
        return key != null && this.contains((boolean)key);
    }
    
    @Deprecated
    default boolean remove(final Object key) {
        return key != null && this.rem((boolean)key);
    }
    
    boolean[] toBooleanArray();
    
    @Deprecated
    default boolean[] toBooleanArray(final boolean[] a) {
        return this.toArray(a);
    }
    
    boolean[] toArray(final boolean[] p0);
    
    boolean addAll(final BooleanCollection p0);
    
    boolean containsAll(final BooleanCollection p0);
    
    boolean removeAll(final BooleanCollection p0);
    
    @Deprecated
    default boolean removeIf(final Predicate<? super Boolean> filter) {
        return this.removeIf((filter instanceof BooleanPredicate) ? ((BooleanPredicate)filter) : (key -> filter.test(key)));
    }
    
    default boolean removeIf(final BooleanPredicate filter) {
        Objects.requireNonNull(filter);
        boolean removed = false;
        final BooleanIterator each = this.iterator();
        while (each.hasNext()) {
            if (filter.test(each.nextBoolean())) {
                each.remove();
                removed = true;
            }
        }
        return removed;
    }
    
    boolean retainAll(final BooleanCollection p0);
}
