The LinkedBlockingDeque class introduced in JDK 1.6 is present in java.util.concurrent package. It is a deque which means a doubly ended queue. The default size… Read More
Tag Archives: Java-LinkedBlockingDeque
The removeIf() method of LinkedBlockingDeque removes the element from this LinkedBlockingDeque that satisfies the specified condition. Syntax: public boolean removeIf (Predicate<? super E> filter) Parameters:… Read More
The forEach() method of LinkedBlockingDeque performs the given action for each element of the Iterable until all elements have been processed or the action throws… Read More
The removeAll() method of LinkedBlockingDeque is an in-built function is Java which is used to remove from this deque all of its elements that are… Read More
The retainAll() method of LinkedBlockingDeque is an in-built function is Java which is used to remove from this deque all of its elements that are… Read More
The addAll() method of LinkedBlockingDeque appends all of the elements of the specified collection to the end of this deque.Syntax: public void addAll(Collection<E> c) Parameters:… Read More
The hashCode() method of LinkedBlockingDeque in Java is used to get the hashCode value for this instance of the LinkedBlockingDeque. It returns an integer value… Read More
The drainTo(Collection col) method of LinkedBlockingDeque removes all available elements from this LinkedBlockingDeque and adds them to the given collection passed as a parameter. drainTo(Collection<E>… Read More
The isEmpty() method of LinkedBlockingDeque in Java is used to check whether this LinkedBlockingDeque is empty or not. It returns an boolean value stating the… Read More
The equals() method of java.util.LinkedBlockingDeque class is used to compare the specified object with this LinkedBlockingDeque for equality. Returns true if and only if the… Read More
toArray() The Java.util.concurrent.LinkedBlockingDeque.toArray() method returns an array containing all the elements in the deque in proper sequence i.e. from first to last. The returned array… Read More
The LinkedBlockingDeque class in Java is a part of the Java Collection Framework. It was introduced in JDK 1.6 and it belongs to java.util.concurrent package.… Read More
The addFirst(E e) method of Deque Interface inserts the element passed in the parameter to the front of the Deque if there is space. If… Read More
The toString() method of LinkedBlockingDeque returns a string representation of this collection. The string representation consists of a list of the collection’s elements in the… Read More
The putLast(E e) method of LinkedBlockingDeque inserts the specified element into the queue represented by this deque (in other words, at the tail/end of this… Read More