CopyOnWriteArrayList iterator method

The CopyOnWriteArrayList iterator method returns an iterator over the elements in the sequence they were inserted. As explained in the previous posts, CopyOnWriteArrayList creates its copy when per

Read More →

CopyOnWriteArrayList addAllAbsent method

CopyOnWriteArrayList provides a new method public int addAllAbsent(Collection<? extends E> c) , which adds all of the elements in the specified collection that are not already contained in this list, to the end of

Read More →

Add elements in CopyOnWriteArrayList

In this post we will see how to add elements in CopyOnWriteArrayList using below 2 methods 1. boolean add(E e) Appends the specified element to the end of this list. 2. void add(int index, E elemen

Read More →

LinkedList in java

As we have seen earlier, ArrayList is not so good when it comes to adding/removing elements using index. This is solved using the LinkedList in java. Few points about LinkedList to remember 1. It i

Read More →

ArrayList in Java

ArrayList in Java is an implementation of the List interface. Few points about ArrayList 1. Internally uses array but can be dynamically resized. 2. Allows duplicate elements 3. Maintains the inser

Read More →

String to Date mapping in Dozer

String to Date mapping in Dozer can be configured in multiple ways using the XML configurations. 1. Field Level Mapping Date format in which date needs to be parsed can be specified on that particu

Read More →