其他分享
首页 > 其他分享> > 040_JDK的List接口

040_JDK的List接口

作者:互联网

package java.util;

import java.util.function.UnaryOperator;

public interface List<E> extends Collection<E> {

    int size();

    boolean isEmpty();

    boolean contains(Object o);

    Iterator<E> iterator();

    Object[] toArray();

    <T> T[] toArray(T[] a);

    boolean add(E e);

    boolean remove(Object o);

    boolean containsAll(Collection<?> c);

    boolean addAll(Collection<? extends E> c);

    boolean addAll(int index, Collection<? extends E> c);

    boolean removeAll(Collection<?> c);

    default void sort(Comparator<? super E> c) {
        Collections.sort(this, c);
    }

    void clear();

    boolean equals(Object o);

    int hashCode();

    E get(int index);

    E set(int index, E element);

    void add(int index, E element);

    E remove(int index);

    int indexOf(Object o);

    int lastIndexOf(Object o);

    List<E> subList(int fromIndex, int toIndex);

}

 

标签:index,JDK,int,void,Object,List,Collection,boolean,040
来源: https://blog.csdn.net/aihiao/article/details/116905445