All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.strobel.core.IReadOnlyList Maven / Gradle / Ivy

/*
 * IReadOnlyList.java
 *
 * Copyright (c) 2012 Mike Strobel
 *
 * This source code is subject to terms and conditions of the Apache License, Version 2.0.
 * A copy of the license can be found in the License.html file at the root of this distribution.
 * By using this source code in any fashion, you are agreeing to be bound by the terms of the
 * Apache License, Version 2.0.
 *
 * You must not remove this notice, or any other, from this software.
 */

package com.strobel.core;

import com.strobel.annotations.NotNull;

import java.util.ListIterator;
import java.util.RandomAccess;

/**
 * @author Mike Strobel
 */
public interface IReadOnlyList extends Iterable, RandomAccess {
    int size();

     int indexOf(U o);
     int lastIndexOf(U o);

    boolean isEmpty();
     boolean contains(U o);
    boolean containsAll(Iterable c);

    T get(int index);

    @NotNull
    T[] toArray();
    @NotNull
     T[] toArray(T[] a);

    @NotNull
    ListIterator listIterator();

    @NotNull
    ListIterator listIterator(int index);
}