Class BooleanLists.SynchronizedList

java.lang.Object
it.unimi.dsi.fastutil.booleans.BooleanLists.SynchronizedList
All Implemented Interfaces:
BooleanCollection, BooleanIterable, BooleanList, Serializable, Comparable<List<? extends Boolean>>, Iterable<Boolean>, Collection<Boolean>, List<Boolean>
Direct Known Subclasses:
BooleanLists.SynchronizedRandomAccessList
Enclosing class:
BooleanLists

public static class BooleanLists.SynchronizedList
extends Object
implements BooleanList, Serializable
A synchronized wrapper class for lists.
See Also:
Serialized Form
  • Method Summary

    Modifier and Type Method Description
    boolean add​(boolean k)
    Ensures that this collection contains the specified element (optional operation).
    void add​(int i, boolean k)
    Inserts the specified element at the specified position in this list (optional operation).
    void add​(int i, Boolean k)
    Deprecated.
    Please use the corresponding type-specific method instead.
    boolean add​(Boolean k)
    Deprecated.
    boolean addAll​(int index, BooleanCollection c)
    Inserts all of the elements in the specified type-specific collection into this type-specific list at the specified position (optional operation).
    boolean addAll​(int index, BooleanList l)
    Inserts all of the elements in the specified type-specific list into this type-specific list at the specified position (optional operation).
    boolean addAll​(int index, Collection<? extends Boolean> c)  
    boolean addAll​(BooleanCollection c)
    Adds all elements of the given type-specific collection to this collection.
    boolean addAll​(BooleanList l)
    Appends all of the elements in the specified type-specific list to the end of this type-specific list (optional operation).
    boolean addAll​(Collection<? extends Boolean> c)  
    void addElements​(int index, boolean[] a)
    Add (hopefully quickly) elements to this type-specific list.
    void addElements​(int index, boolean[] a, int offset, int length)
    Add (hopefully quickly) elements to this type-specific list.
    void clear()  
    int compareTo​(List<? extends Boolean> o)  
    boolean contains​(boolean k)
    Returns true if this collection contains the specified element.
    boolean contains​(Object k)
    Deprecated.
    boolean containsAll​(BooleanCollection c)
    Checks whether this collection contains all elements from the given type-specific collection.
    boolean containsAll​(Collection<?> c)  
    boolean equals​(Object o)  
    void forEach​(BooleanConsumer action)
    Performs the given action for each element of this type-specific Iterable until all elements have been processed or the action throws an exception.
    Boolean get​(int i)
    Deprecated.
    Please use the corresponding type-specific method instead.
    boolean getBoolean​(int i)
    Returns the element at the specified position in this list.
    void getElements​(int from, boolean[] a, int offset, int length)
    Copies (hopefully quickly) elements of this type-specific list into the given array.
    int hashCode()  
    int indexOf​(boolean k)
    Returns the index of the first occurrence of the specified element in this list, or -1 if this list does not contain the element.
    int indexOf​(Object o)
    Deprecated.
    Please use the corresponding type-specific method instead.
    boolean isEmpty()  
    BooleanListIterator iterator()
    Returns a type-specific iterator on the elements of this collection.
    int lastIndexOf​(boolean k)
    Returns the index of the last occurrence of the specified element in this list, or -1 if this list does not contain the element.
    int lastIndexOf​(Object o)
    Deprecated.
    Please use the corresponding type-specific method instead.
    BooleanListIterator listIterator()
    Returns a type-specific list iterator on the list.
    BooleanListIterator listIterator​(int i)
    Returns a type-specific list iterator on the list starting at a given index.
    Stream<Boolean> parallelStream()  
    boolean rem​(boolean k)
    Removes a single instance of the specified element from this collection, if it is present (optional operation).
    Boolean remove​(int i)
    Deprecated.
    Please use the corresponding type-specific method instead.
    boolean remove​(Object k)
    Deprecated.
    boolean removeAll​(BooleanCollection c)
    Remove from this collection all elements in the given type-specific collection.
    boolean removeAll​(Collection<?> c)  
    boolean removeBoolean​(int i)
    Removes the element at the specified position in this list (optional operation).
    void removeElements​(int from, int to)
    Removes (hopefully quickly) elements of this type-specific list.
    boolean removeIf​(BooleanPredicate filter)
    Remove from this collection all elements which satisfy the given predicate.
    void replaceAll​(BooleanUnaryOperator operator)
    Replaces each element of this list with the result of applying the operator to that element.
    boolean retainAll​(BooleanCollection c)
    Retains in this collection only elements from the given type-specific collection.
    boolean retainAll​(Collection<?> c)  
    boolean set​(int i, boolean k)
    Replaces the element at the specified position in this list with the specified element (optional operation).
    Boolean set​(int index, Boolean k)
    Deprecated.
    Please use the corresponding type-specific method instead.
    void setElements​(boolean[] a)
    Set (hopefully quickly) elements to match the array given.
    void setElements​(int index, boolean[] a)
    Set (hopefully quickly) elements to match the array given.
    void setElements​(int index, boolean[] a, int offset, int length)
    Set (hopefully quickly) elements to match the array given.
    int size()  
    void size​(int size)
    Sets the size of this list.
    void sort​(BooleanComparator comparator)
    Sort a list using a type-specific comparator.
    void sort​(Comparator<? super Boolean> comparator)
    Deprecated.
    BooleanSpliterator spliterator()
    Returns a type-specific spliterator on the elements of this collection.
    Stream<Boolean> stream()  
    BooleanList subList​(int from, int to)
    Returns a type-specific view of the portion of this list from the index from, inclusive, to the index to, exclusive.
    Object[] toArray()  
    boolean[] toArray​(boolean[] a)
    Returns an array containing all of the elements in this collection; the runtime type of the returned array is that of the specified array.
    <T> T[] toArray​(T[] a)  
    boolean[] toBooleanArray()
    Returns a primitive type array containing the items of this collection.
    boolean[] toBooleanArray​(boolean[] a)
    Deprecated.
    String toString()  
    void unstableSort​(BooleanComparator comparator)
    Sorts this list using a sort not assured to be stable.
    void unstableSort​(Comparator<? super Boolean> comparator)
    Deprecated.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface it.unimi.dsi.fastutil.booleans.BooleanCollection

    addAll, contains, containsAll, rem, removeAll, removeIf, retainAll, toArray, toBooleanArray, toBooleanArray

    Methods inherited from interface it.unimi.dsi.fastutil.booleans.BooleanIterable

    forEach, forEach

    Methods inherited from interface it.unimi.dsi.fastutil.booleans.BooleanList

    add, add, contains, remove, replaceAll, spliterator

    Methods inherited from interface java.util.Collection

    parallelStream, stream, toArray

    Methods inherited from interface java.util.List

    addAll, clear, containsAll, isEmpty, removeAll, retainAll, size, toArray, toArray