package queue;

import java.util.function.Predicate;

/**
 * @author Doschennikov Nikita (me@fymio.us)
 */
public interface Queue {
    void enqueue(Object element);

    void push(Object element);

    Object element();

    Object peek();

    Object dequeue();

    Object remove();

    int size();

    boolean isEmpty();

    void clear();

    int count(Object element);

    int countIf(Predicate<Object> predicate);

    int indexIf(Predicate<Object> predicate);

    int lastIndexIf(Predicate<Object> predicate);

    int indexOf(Object element);

    int lastIndexOf(Object element);

    boolean contains(Object element);

    boolean removeFirst(Object element);

    Queue getNth(int n);

    Queue removeNth(int n);

    void dropNth(int n);

    void removeIf(java.util.function.Predicate<Object> predicate);

    void retainIf(java.util.function.Predicate<Object> predicate);

    void removeAll(Object element);

    void retainAll(Object element);
}
