diff --git a/study/COLLECTIONS.MD b/study/COLLECTIONS.MD index 30f723d..c5048cd 100644 --- a/study/COLLECTIONS.MD +++ b/study/COLLECTIONS.MD @@ -25,23 +25,24 @@ All datastructures referenced here can be imported using `import java.util. c)** | It is used to insert the specified collection elements in the invoking collection. | -| **public boolean remove(Object element)** | It is used to delete an element from the collection. || **public boolean removeAll(Collection c)** | It is used to delete all the elements of the specified collection from the invoking collection. | -| **default boolean removeIf(Predicate filter)** | It is used to delete all the elements of the collection that satisfy the specified predicate. | -| **public boolean retainAll(Collection c)** | It is used to delete all the elements of invoking collection except the specified collection. | -| **public int size()** | It returns the total number of elements in the collection. | -| **public void clear()** | It removes the total number of elements from the collection. | -| **public boolean contains(Object element)** | It is used to search an element. | -| **public boolean containsAll(Collection c)** | It is used to search the specified collection in the collection. | -| **public Iterator iterator()** | It returns an iterator. | -| **public Object[] toArray()** | It converts collection into array. | -| **public T[] toArray(T[] a)** | It converts collection into array. Here, the runtime type of the returned array is that of the specified array. | -| **public boolean isEmpty()** | It checks if collection is empty. | -| **default Stream parallelStream()** | It returns a possibly parallel Stream with the collection as its source. | -| **default Stream stream()** | It returns a sequential Stream with the collection as its source. | -| **default Spliterator spliterator()** | It generates a Spliterator over the specified elements in the collection. | -| **public boolean equals(Object element)** | It matches two collections. | -| **public int hashCode()** | It returns the hash code number of the collection. | \ No newline at end of file +| Method | Description | +|-----------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------| +| **public boolean add(E e)** | It is used to insert an element in this collection. | +| **public boolean addAll(Collection c)** | It is used to insert the specified collection elements in the invoking collection. | +| **public boolean remove(Object element)** | It is used to delete an element from the collection. | +| **public boolean removeAll(Collection c)** | It is used to delete all the elements of the specified collection from the invoking collection. | +| **default boolean removeIf(Predicate filter)** | It is used to delete all the elements of the collection that satisfy the specified predicate. | +| **public boolean retainAll(Collection c)** | It is used to delete all the elements of invoking collection except the specified collection. | +| **public int size()** | It returns the total number of elements in the collection. | +| **public void clear()** | It removes the total number of elements from the collection. | +| **public boolean contains(Object element)** | It is used to search an element. | +| **public boolean containsAll(Collection c)** | It is used to search the specified collection in the collection. | +| **public Iterator iterator()** | It returns an iterator. | +| **public Object[] toArray()** | It converts collection into array. | +| **public T[] toArray(T[] a)** | It converts collection into array. Here, the runtime type of the returned array is that of the specified array. | +| **public boolean isEmpty()** | It checks if collection is empty. | +| **default Stream parallelStream()** | It returns a possibly parallel Stream with the collection as its source. | +| **default Stream stream()** | It returns a sequential Stream with the collection as its source. | +| **default Spliterator spliterator()** | It generates a Spliterator over the specified elements in the collection. | +| **public boolean equals(Object element)** | It matches two collections. | +| **public int hashCode()** | It returns the hash code number of the collection. | \ No newline at end of file