commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject [7/9] commons-collections git commit: Remove redundant type arguments.
Date Thu, 27 Jul 2017 06:43:27 GMT
http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableMapIterator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableMapIterator.java b/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableMapIterator.java
index 154fd8a..0b4d926 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableMapIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableMapIterator.java
@@ -52,7 +52,7 @@ public final class UnmodifiableMapIterator<K, V> implements MapIterator<K, V>, U
             final MapIterator<K, V> tmpIterator = (MapIterator<K, V>) iterator;
             return tmpIterator;
         }
-        return new UnmodifiableMapIterator<K, V>(iterator);
+        return new UnmodifiableMapIterator<>(iterator);
     }
 
     //-----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableOrderedMapIterator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableOrderedMapIterator.java b/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableOrderedMapIterator.java
index 52421e7..34b5711 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableOrderedMapIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableOrderedMapIterator.java
@@ -54,7 +54,7 @@ public final class UnmodifiableOrderedMapIterator<K, V> implements OrderedMapIte
             final OrderedMapIterator<K, V> tmpIterator = (OrderedMapIterator<K, V>) iterator;
             return tmpIterator;
         }
-        return new UnmodifiableOrderedMapIterator<K, V>(iterator);
+        return new UnmodifiableOrderedMapIterator<>(iterator);
     }
 
     //-----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/iterators/ZippingIterator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/iterators/ZippingIterator.java b/src/main/java/org/apache/commons/collections4/iterators/ZippingIterator.java
index 4558498..6b05872 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/ZippingIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/ZippingIterator.java
@@ -86,7 +86,7 @@ public class ZippingIterator<E> implements Iterator<E> {
      */
     public ZippingIterator(final Iterator<? extends E>... iterators) {
         // create a mutable list to be able to remove exhausted iterators
-        final List<Iterator<? extends E>> list = new ArrayList<Iterator<? extends E>>();
+        final List<Iterator<? extends E>> list = new ArrayList<>();
         for (final Iterator<? extends E> iterator : iterators) {
             if (iterator == null) {
                 throw new NullPointerException("Iterator must not be null.");

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/keyvalue/DefaultKeyValue.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/keyvalue/DefaultKeyValue.java b/src/main/java/org/apache/commons/collections4/keyvalue/DefaultKeyValue.java
index 6a584eb..99b46f6 100644
--- a/src/main/java/org/apache/commons/collections4/keyvalue/DefaultKeyValue.java
+++ b/src/main/java/org/apache/commons/collections4/keyvalue/DefaultKeyValue.java
@@ -109,7 +109,7 @@ public class DefaultKeyValue<K, V> extends AbstractKeyValue<K, V> {
      * @return a MapEntry instance
      */
     public Map.Entry<K, V> toMapEntry() {
-        return new DefaultMapEntry<K, V>(this);
+        return new DefaultMapEntry<>(this);
     }
 
     //-----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/list/AbstractLinkedList.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/list/AbstractLinkedList.java b/src/main/java/org/apache/commons/collections4/list/AbstractLinkedList.java
index 2d3ea0d..9fdc2ef 100644
--- a/src/main/java/org/apache/commons/collections4/list/AbstractLinkedList.java
+++ b/src/main/java/org/apache/commons/collections4/list/AbstractLinkedList.java
@@ -125,12 +125,12 @@ public abstract class AbstractLinkedList<E> implements List<E> {
 
     @Override
     public ListIterator<E> listIterator() {
-        return new LinkedListIterator<E>(this, 0);
+        return new LinkedListIterator<>(this, 0);
     }
 
     @Override
     public ListIterator<E> listIterator(final int fromIndex) {
-        return new LinkedListIterator<E>(this, fromIndex);
+        return new LinkedListIterator<>(this, fromIndex);
     }
 
     //-----------------------------------------------------------------------
@@ -210,7 +210,7 @@ public abstract class AbstractLinkedList<E> implements List<E> {
      */
     @Override
     public List<E> subList(final int fromIndexInclusive, final int toIndexExclusive) {
-        return new LinkedSubList<E>(this, fromIndexInclusive, toIndexExclusive);
+        return new LinkedSubList<>(this, fromIndexInclusive, toIndexExclusive);
     }
 
     //-----------------------------------------------------------------------
@@ -459,7 +459,7 @@ public abstract class AbstractLinkedList<E> implements List<E> {
      * @return  newly created node
      */
     protected Node<E> createHeaderNode() {
-        return new Node<E>();
+        return new Node<>();
     }
 
     /**
@@ -471,7 +471,7 @@ public abstract class AbstractLinkedList<E> implements List<E> {
      * @return a new node containing the value
      */
     protected Node<E> createNode(final E value) {
-        return new Node<E>(value);
+        return new Node<>(value);
     }
 
     /**
@@ -608,7 +608,7 @@ public abstract class AbstractLinkedList<E> implements List<E> {
      * @return a new list iterator on the given sublist
      */
     protected ListIterator<E> createSubListListIterator(final LinkedSubList<E> subList, final int fromIndex) {
-        return new LinkedSubListIterator<E>(subList, fromIndex);
+        return new LinkedSubListIterator<>(subList, fromIndex);
     }
 
     //-----------------------------------------------------------------------
@@ -1080,7 +1080,7 @@ public abstract class AbstractLinkedList<E> implements List<E> {
 
         @Override
         public List<E> subList(final int fromIndexInclusive, final int toIndexExclusive) {
-            return new LinkedSubList<E>(parent, fromIndexInclusive + offset, toIndexExclusive + offset);
+            return new LinkedSubList<>(parent, fromIndexInclusive + offset, toIndexExclusive + offset);
         }
 
         protected void rangeCheck(final int index, final int beyond) {

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/list/CursorableLinkedList.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/list/CursorableLinkedList.java b/src/main/java/org/apache/commons/collections4/list/CursorableLinkedList.java
index 8f673a1..101bf43 100644
--- a/src/main/java/org/apache/commons/collections4/list/CursorableLinkedList.java
+++ b/src/main/java/org/apache/commons/collections4/list/CursorableLinkedList.java
@@ -88,7 +88,7 @@ public class CursorableLinkedList<E> extends AbstractLinkedList<E> implements Se
     @Override
     protected void init() {
         super.init();
-        cursors = new ArrayList<WeakReference<Cursor<E>>>();
+        cursors = new ArrayList<>();
     }
 
     //-----------------------------------------------------------------------
@@ -202,7 +202,7 @@ public class CursorableLinkedList<E> extends AbstractLinkedList<E> implements Se
      *      (index &lt; 0 || index &gt; size()).
      */
     public CursorableLinkedList.Cursor<E> cursor(final int fromIndex) {
-        final Cursor<E> cursor = new Cursor<E>(this, fromIndex);
+        final Cursor<E> cursor = new Cursor<>(this, fromIndex);
         registerCursor(cursor);
         return cursor;
     }
@@ -277,7 +277,7 @@ public class CursorableLinkedList<E> extends AbstractLinkedList<E> implements Se
                 it.remove();
             }
         }
-        cursors.add(new WeakReference<Cursor<E>>(cursor));
+        cursors.add(new WeakReference<>(cursor));
     }
 
     /**
@@ -387,7 +387,7 @@ public class CursorableLinkedList<E> extends AbstractLinkedList<E> implements Se
      */
     @Override
     protected ListIterator<E> createSubListListIterator(final LinkedSubList<E> subList, final int fromIndex) {
-        final SubCursor<E> cursor = new SubCursor<E>(subList, fromIndex);
+        final SubCursor<E> cursor = new SubCursor<>(subList, fromIndex);
         registerCursor(cursor);
         return cursor;
     }

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/list/FixedSizeList.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/list/FixedSizeList.java b/src/main/java/org/apache/commons/collections4/list/FixedSizeList.java
index 7c2f16f..d397019 100644
--- a/src/main/java/org/apache/commons/collections4/list/FixedSizeList.java
+++ b/src/main/java/org/apache/commons/collections4/list/FixedSizeList.java
@@ -53,7 +53,7 @@ public class FixedSizeList<E>
      * @since 4.0
      */
     public static <E> FixedSizeList<E> fixedSizeList(final List<E> list) {
-        return new FixedSizeList<E>(list);
+        return new FixedSizeList<>(list);
     }
 
     //-----------------------------------------------------------------------
@@ -151,7 +151,7 @@ public class FixedSizeList<E>
     @Override
     public List<E> subList(final int fromIndex, final int toIndex) {
         final List<E> sub = decorated().subList(fromIndex, toIndex);
-        return new FixedSizeList<E>(sub);
+        return new FixedSizeList<>(sub);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/list/GrowthList.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/list/GrowthList.java b/src/main/java/org/apache/commons/collections4/list/GrowthList.java
index a809d7f..10ce036 100644
--- a/src/main/java/org/apache/commons/collections4/list/GrowthList.java
+++ b/src/main/java/org/apache/commons/collections4/list/GrowthList.java
@@ -67,7 +67,7 @@ public class GrowthList<E> extends AbstractSerializableListDecorator<E> {
      * @since 4.0
      */
     public static <E> GrowthList<E> growthList(final List<E> list) {
-        return new GrowthList<E>(list);
+        return new GrowthList<>(list);
     }
 
     //-----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/list/LazyList.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/list/LazyList.java b/src/main/java/org/apache/commons/collections4/list/LazyList.java
index 1432461..22f6b04 100644
--- a/src/main/java/org/apache/commons/collections4/list/LazyList.java
+++ b/src/main/java/org/apache/commons/collections4/list/LazyList.java
@@ -76,7 +76,7 @@ public class LazyList<E> extends AbstractSerializableListDecorator<E> {
      * @since 4.0
      */
     public static <E> LazyList<E> lazyList(final List<E> list, final Factory<? extends E> factory) {
-        return new LazyList<E>(list, factory);
+        return new LazyList<>(list, factory);
     }
 
     //-----------------------------------------------------------------------
@@ -135,7 +135,7 @@ public class LazyList<E> extends AbstractSerializableListDecorator<E> {
     @Override
     public List<E> subList(final int fromIndex, final int toIndex) {
         final List<E> sub = decorated().subList(fromIndex, toIndex);
-        return new LazyList<E>(sub, factory);
+        return new LazyList<>(sub, factory);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/list/PredicatedList.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/list/PredicatedList.java b/src/main/java/org/apache/commons/collections4/list/PredicatedList.java
index bc475be..0501d9e 100644
--- a/src/main/java/org/apache/commons/collections4/list/PredicatedList.java
+++ b/src/main/java/org/apache/commons/collections4/list/PredicatedList.java
@@ -65,7 +65,7 @@ public class PredicatedList<E> extends PredicatedCollection<E> implements List<E
      * @since 4.0
      */
     public static <T> PredicatedList<T> predicatedList(final List<T> list, final Predicate<? super T> predicate) {
-        return new PredicatedList<T>(list, predicate);
+        return new PredicatedList<>(list, predicate);
     }
 
     //-----------------------------------------------------------------------
@@ -161,7 +161,7 @@ public class PredicatedList<E> extends PredicatedCollection<E> implements List<E
     @Override
     public List<E> subList(final int fromIndex, final int toIndex) {
         final List<E> sub = decorated().subList(fromIndex, toIndex);
-        return new PredicatedList<E>(sub, predicate);
+        return new PredicatedList<>(sub, predicate);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/list/SetUniqueList.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/list/SetUniqueList.java b/src/main/java/org/apache/commons/collections4/list/SetUniqueList.java
index ac4c6aa..f1e3bb6 100644
--- a/src/main/java/org/apache/commons/collections4/list/SetUniqueList.java
+++ b/src/main/java/org/apache/commons/collections4/list/SetUniqueList.java
@@ -73,11 +73,11 @@ public class SetUniqueList<E> extends AbstractSerializableListDecorator<E> {
             throw new NullPointerException("List must not be null");
         }
         if (list.isEmpty()) {
-            return new SetUniqueList<E>(list, new HashSet<E>());
+            return new SetUniqueList<>(list, new HashSet<E>());
         }
-        final List<E> temp = new ArrayList<E>(list);
+        final List<E> temp = new ArrayList<>(list);
         list.clear();
-        final SetUniqueList<E> sl = new SetUniqueList<E>(list, new HashSet<E>());
+        final SetUniqueList<E> sl = new SetUniqueList<>(list, new HashSet<E>());
         sl.addAll(temp);
         return sl;
     }
@@ -188,7 +188,7 @@ public class SetUniqueList<E> extends AbstractSerializableListDecorator<E> {
      */
     @Override
     public boolean addAll(final int index, final Collection<? extends E> coll) {
-        final List<E> temp = new ArrayList<E>();
+        final List<E> temp = new ArrayList<>();
         for (final E e : coll) {
             if (set.add(e)) {
                 temp.add(e);
@@ -293,17 +293,17 @@ public class SetUniqueList<E> extends AbstractSerializableListDecorator<E> {
 
     @Override
     public Iterator<E> iterator() {
-        return new SetListIterator<E>(super.iterator(), set);
+        return new SetListIterator<>(super.iterator(), set);
     }
 
     @Override
     public ListIterator<E> listIterator() {
-        return new SetListListIterator<E>(super.listIterator(), set);
+        return new SetListListIterator<>(super.listIterator(), set);
     }
 
     @Override
     public ListIterator<E> listIterator(final int index) {
-        return new SetListListIterator<E>(super.listIterator(index), set);
+        return new SetListListIterator<>(super.listIterator(index), set);
     }
 
     /**
@@ -316,7 +316,7 @@ public class SetUniqueList<E> extends AbstractSerializableListDecorator<E> {
     public List<E> subList(final int fromIndex, final int toIndex) {
         final List<E> superSubList = super.subList(fromIndex, toIndex);
         final Set<E> subSet = createSetBasedOnList(set, superSubList);
-        return ListUtils.unmodifiableList(new SetUniqueList<E>(superSubList, subSet));
+        return ListUtils.unmodifiableList(new SetUniqueList<>(superSubList, subSet));
     }
 
     /**
@@ -332,14 +332,14 @@ public class SetUniqueList<E> extends AbstractSerializableListDecorator<E> {
     protected Set<E> createSetBasedOnList(final Set<E> set, final List<E> list) {
         Set<E> subSet;
         if (set.getClass().equals(HashSet.class)) {
-            subSet = new HashSet<E>(list.size());
+            subSet = new HashSet<>(list.size());
         } else {
             try {
                 subSet = set.getClass().newInstance();
             } catch (final InstantiationException ie) {
-                subSet = new HashSet<E>();
+                subSet = new HashSet<>();
             } catch (final IllegalAccessException iae) {
-                subSet = new HashSet<E>();
+                subSet = new HashSet<>();
             }
         }
         subSet.addAll(list);

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/list/TransformedList.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/list/TransformedList.java b/src/main/java/org/apache/commons/collections4/list/TransformedList.java
index 01d4894..9c2de73 100644
--- a/src/main/java/org/apache/commons/collections4/list/TransformedList.java
+++ b/src/main/java/org/apache/commons/collections4/list/TransformedList.java
@@ -58,7 +58,7 @@ public class TransformedList<E> extends TransformedCollection<E> implements List
      */
     public static <E> TransformedList<E> transformingList(final List<E> list,
                                                           final Transformer<? super E, ? extends E> transformer) {
-        return new TransformedList<E>(list, transformer);
+        return new TransformedList<>(list, transformer);
     }
 
     /**
@@ -78,7 +78,7 @@ public class TransformedList<E> extends TransformedCollection<E> implements List
      */
     public static <E> TransformedList<E> transformedList(final List<E> list,
                                                          final Transformer<? super E, ? extends E> transformer) {
-        final TransformedList<E> decorated = new TransformedList<E>(list, transformer);
+        final TransformedList<E> decorated = new TransformedList<>(list, transformer);
         if (list.size() > 0) {
             @SuppressWarnings("unchecked") // list is of type E
             final E[] values = (E[]) list.toArray(); // NOPMD - false positive for generics
@@ -179,7 +179,7 @@ public class TransformedList<E> extends TransformedCollection<E> implements List
     @Override
     public List<E> subList(final int fromIndex, final int toIndex) {
         final List<E> sub = getList().subList(fromIndex, toIndex);
-        return new TransformedList<E>(sub, transformer);
+        return new TransformedList<>(sub, transformer);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/list/TreeList.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/list/TreeList.java b/src/main/java/org/apache/commons/collections4/list/TreeList.java
index c318eaf..77285c6 100644
--- a/src/main/java/org/apache/commons/collections4/list/TreeList.java
+++ b/src/main/java/org/apache/commons/collections4/list/TreeList.java
@@ -84,7 +84,7 @@ public class TreeList<E> extends AbstractList<E> {
     public TreeList(final Collection<? extends E> coll) {
         super();
         if (!coll.isEmpty()) {
-            root = new AVLNode<E>(coll);
+            root = new AVLNode<>(coll);
             size = coll.size();
         }
     }
@@ -145,7 +145,7 @@ public class TreeList<E> extends AbstractList<E> {
         // override to go 75% faster
         // cannot use EmptyIterator as iterator.add() must work
         checkInterval(fromIndex, 0, size());
-        return new TreeListIterator<E>(this, fromIndex);
+        return new TreeListIterator<>(this, fromIndex);
     }
 
     /**
@@ -201,7 +201,7 @@ public class TreeList<E> extends AbstractList<E> {
         modCount++;
         checkInterval(index, 0, size());
         if (root == null) {
-            root = new AVLNode<E>(index, obj, null, null);
+            root = new AVLNode<>(index, obj, null, null);
         } else {
             root = root.insert(index, obj);
         }
@@ -225,7 +225,7 @@ public class TreeList<E> extends AbstractList<E> {
             return false;
         }
         modCount += c.size();
-        final AVLNode<E> cTree = new AVLNode<E>(c);
+        final AVLNode<E> cTree = new AVLNode<>(c);
         root = root == null ? cTree : root.addAll(cTree, size);
         size += c.size();
         return true;
@@ -372,7 +372,7 @@ public class TreeList<E> extends AbstractList<E> {
                         final int absolutePositionOfParent, final AVLNode<E> prev, final AVLNode<E> next) {
             final int mid = start + (end - start) / 2;
             if (start < mid) {
-                left = new AVLNode<E>(iterator, start, mid - 1, mid, prev, this);
+                left = new AVLNode<>(iterator, start, mid - 1, mid, prev, this);
             } else {
                 leftIsPrevious = true;
                 left = prev;
@@ -380,7 +380,7 @@ public class TreeList<E> extends AbstractList<E> {
             value = iterator.next();
             relativePosition = mid - absolutePositionOfParent;
             if (mid < end) {
-                right = new AVLNode<E>(iterator, mid + 1, end, mid, this, next);
+                right = new AVLNode<>(iterator, mid + 1, end, mid, this, next);
             } else {
                 rightIsNext = true;
                 right = next;
@@ -501,7 +501,7 @@ public class TreeList<E> extends AbstractList<E> {
 
         private AVLNode<E> insertOnLeft(final int indexRelativeToMe, final E obj) {
             if (getLeftSubTree() == null) {
-                setLeft(new AVLNode<E>(-1, obj, this, left), null);
+                setLeft(new AVLNode<>(-1, obj, this, left), null);
             } else {
                 setLeft(left.insert(indexRelativeToMe, obj), null);
             }
@@ -516,7 +516,7 @@ public class TreeList<E> extends AbstractList<E> {
 
         private AVLNode<E> insertOnRight(final int indexRelativeToMe, final E obj) {
             if (getRightSubTree() == null) {
-                setRight(new AVLNode<E>(+1, obj, right, this), null);
+                setRight(new AVLNode<>(+1, obj, right, this), null);
             } else {
                 setRight(right.insert(indexRelativeToMe, obj), null);
             }
@@ -828,7 +828,7 @@ public class TreeList<E> extends AbstractList<E> {
                 // find a subtree, s, that is no taller than me. (While we are
                 // navigating left, we store the nodes we encounter in a stack
                 // so that we can re-balance them in step 4.)
-                final Deque<AVLNode<E>> sAncestors = new ArrayDeque<AVLNode<E>>();
+                final Deque<AVLNode<E>> sAncestors = new ArrayDeque<>();
                 AVLNode<E> s = otherTree;
                 int sAbsolutePosition = s.relativePosition + currentSize;
                 int sParentAbsolutePosition = 0;
@@ -868,7 +868,7 @@ public class TreeList<E> extends AbstractList<E> {
             }
             otherTree = otherTree.removeMin();
 
-            final Deque<AVLNode<E>> sAncestors = new ArrayDeque<AVLNode<E>>();
+            final Deque<AVLNode<E>> sAncestors = new ArrayDeque<>();
             AVLNode<E> s = this;
             int sAbsolutePosition = s.relativePosition;
             int sParentAbsolutePosition = 0;

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/list/UnmodifiableList.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/list/UnmodifiableList.java b/src/main/java/org/apache/commons/collections4/list/UnmodifiableList.java
index 30fbb14..c23e4e6 100644
--- a/src/main/java/org/apache/commons/collections4/list/UnmodifiableList.java
+++ b/src/main/java/org/apache/commons/collections4/list/UnmodifiableList.java
@@ -57,7 +57,7 @@ public final class UnmodifiableList<E>
             final List<E> tmpList = (List<E>) list;
             return tmpList;
         }
-        return new UnmodifiableList<E>(list);
+        return new UnmodifiableList<>(list);
     }
 
     //-----------------------------------------------------------------------
@@ -142,7 +142,7 @@ public final class UnmodifiableList<E>
     @Override
     public List<E> subList(final int fromIndex, final int toIndex) {
         final List<E> sub = decorated().subList(fromIndex, toIndex);
-        return new UnmodifiableList<E>(sub);
+        return new UnmodifiableList<>(sub);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/map/AbstractHashedMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/map/AbstractHashedMap.java b/src/main/java/org/apache/commons/collections4/map/AbstractHashedMap.java
index 6f2867b..78ee18e 100644
--- a/src/main/java/org/apache/commons/collections4/map/AbstractHashedMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/AbstractHashedMap.java
@@ -533,7 +533,7 @@ public class AbstractHashedMap<K, V> extends AbstractMap<K, V> implements Iterab
      * @return the newly created entry
      */
     protected HashEntry<K, V> createEntry(final HashEntry<K, V> next, final int hashCode, final K key, final V value) {
-        return new HashEntry<K, V>(next, hashCode, convertKey(key), value);
+        return new HashEntry<>(next, hashCode, convertKey(key), value);
     }
 
     /**
@@ -757,7 +757,7 @@ public class AbstractHashedMap<K, V> extends AbstractMap<K, V> implements Iterab
         if (size == 0) {
             return EmptyMapIterator.<K, V>emptyMapIterator();
         }
-        return new HashMapIterator<K, V>(this);
+        return new HashMapIterator<>(this);
     }
 
     /**
@@ -813,7 +813,7 @@ public class AbstractHashedMap<K, V> extends AbstractMap<K, V> implements Iterab
     @Override
     public Set<Map.Entry<K, V>> entrySet() {
         if (entrySet == null) {
-            entrySet = new EntrySet<K, V>(this);
+            entrySet = new EntrySet<>(this);
         }
         return entrySet;
     }
@@ -828,7 +828,7 @@ public class AbstractHashedMap<K, V> extends AbstractMap<K, V> implements Iterab
         if (size() == 0) {
             return EmptyIterator.<Map.Entry<K, V>>emptyIterator();
         }
-        return new EntrySetIterator<K, V>(this);
+        return new EntrySetIterator<>(this);
     }
 
     /**
@@ -908,7 +908,7 @@ public class AbstractHashedMap<K, V> extends AbstractMap<K, V> implements Iterab
     @Override
     public Set<K> keySet() {
         if (keySet == null) {
-            keySet = new KeySet<K>(this);
+            keySet = new KeySet<>(this);
         }
         return keySet;
     }
@@ -923,7 +923,7 @@ public class AbstractHashedMap<K, V> extends AbstractMap<K, V> implements Iterab
         if (size() == 0) {
             return EmptyIterator.<K>emptyIterator();
         }
-        return new KeySetIterator<K>(this);
+        return new KeySetIterator<>(this);
     }
 
     /**
@@ -993,7 +993,7 @@ public class AbstractHashedMap<K, V> extends AbstractMap<K, V> implements Iterab
     @Override
     public Collection<V> values() {
         if (values == null) {
-            values = new Values<V>(this);
+            values = new Values<>(this);
         }
         return values;
     }
@@ -1008,7 +1008,7 @@ public class AbstractHashedMap<K, V> extends AbstractMap<K, V> implements Iterab
         if (size() == 0) {
             return EmptyIterator.<V>emptyIterator();
         }
-        return new ValuesIterator<V>(this);
+        return new ValuesIterator<>(this);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/map/AbstractIterableMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/map/AbstractIterableMap.java b/src/main/java/org/apache/commons/collections4/map/AbstractIterableMap.java
index c66b1be..2927fff 100644
--- a/src/main/java/org/apache/commons/collections4/map/AbstractIterableMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/AbstractIterableMap.java
@@ -32,6 +32,6 @@ public abstract class AbstractIterableMap<K, V> implements IterableMap<K, V> {
      */
     @Override
     public MapIterator<K, V> mapIterator() {
-        return new EntrySetToMapIteratorAdapter<K, V>(entrySet());
+        return new EntrySetToMapIteratorAdapter<>(entrySet());
     }
 }

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/map/AbstractLinkedMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/map/AbstractLinkedMap.java b/src/main/java/org/apache/commons/collections4/map/AbstractLinkedMap.java
index c4b63df..d06d5cb 100644
--- a/src/main/java/org/apache/commons/collections4/map/AbstractLinkedMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/AbstractLinkedMap.java
@@ -285,7 +285,7 @@ public abstract class AbstractLinkedMap<K, V> extends AbstractHashedMap<K, V> im
      */
     @Override
     protected LinkEntry<K, V> createEntry(final HashEntry<K, V> next, final int hashCode, final K key, final V value) {
-        return new LinkEntry<K, V>(next, hashCode, convertKey(key), value);
+        return new LinkEntry<>(next, hashCode, convertKey(key), value);
     }
 
     /**
@@ -344,7 +344,7 @@ public abstract class AbstractLinkedMap<K, V> extends AbstractHashedMap<K, V> im
         if (size == 0) {
             return EmptyOrderedMapIterator.<K, V>emptyOrderedMapIterator();
         }
-        return new LinkMapIterator<K, V>(this);
+        return new LinkMapIterator<>(this);
     }
 
     /**
@@ -407,7 +407,7 @@ public abstract class AbstractLinkedMap<K, V> extends AbstractHashedMap<K, V> im
         if (size() == 0) {
             return EmptyOrderedIterator.<Map.Entry<K, V>>emptyOrderedIterator();
         }
-        return new EntrySetIterator<K, V>(this);
+        return new EntrySetIterator<>(this);
     }
 
     /**
@@ -443,7 +443,7 @@ public abstract class AbstractLinkedMap<K, V> extends AbstractHashedMap<K, V> im
         if (size() == 0) {
             return EmptyOrderedIterator.<K>emptyOrderedIterator();
         }
-        return new KeySetIterator<K>(this);
+        return new KeySetIterator<>(this);
     }
 
     /**
@@ -480,7 +480,7 @@ public abstract class AbstractLinkedMap<K, V> extends AbstractHashedMap<K, V> im
         if (size() == 0) {
             return EmptyOrderedIterator.<V>emptyOrderedIterator();
         }
-        return new ValuesIterator<V>(this);
+        return new ValuesIterator<>(this);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java b/src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java
index d32e63f..5cbd87b 100644
--- a/src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java
@@ -175,7 +175,7 @@ public abstract class AbstractReferenceMap<K, V> extends AbstractHashedMap<K, V>
      */
     @Override
     protected void init() {
-        queue = new ReferenceQueue<Object>();
+        queue = new ReferenceQueue<>();
     }
 
     //-----------------------------------------------------------------------
@@ -304,7 +304,7 @@ public abstract class AbstractReferenceMap<K, V> extends AbstractHashedMap<K, V>
      */
     @Override
     public MapIterator<K, V> mapIterator() {
-        return new ReferenceMapIterator<K, V>(this);
+        return new ReferenceMapIterator<>(this);
     }
 
     /**
@@ -317,7 +317,7 @@ public abstract class AbstractReferenceMap<K, V> extends AbstractHashedMap<K, V>
     @Override
     public Set<Map.Entry<K, V>> entrySet() {
         if (entrySet == null) {
-            entrySet = new ReferenceEntrySet<K, V>(this);
+            entrySet = new ReferenceEntrySet<>(this);
         }
         return entrySet;
     }
@@ -330,7 +330,7 @@ public abstract class AbstractReferenceMap<K, V> extends AbstractHashedMap<K, V>
     @Override
     public Set<K> keySet() {
         if (keySet == null) {
-            keySet = new ReferenceKeySet<K>(this);
+            keySet = new ReferenceKeySet<>(this);
         }
         return keySet;
     }
@@ -343,7 +343,7 @@ public abstract class AbstractReferenceMap<K, V> extends AbstractHashedMap<K, V>
     @Override
     public Collection<V> values() {
         if (values == null) {
-            values = new ReferenceValues<V>(this);
+            values = new ReferenceValues<>(this);
         }
         return values;
     }
@@ -469,7 +469,7 @@ public abstract class AbstractReferenceMap<K, V> extends AbstractHashedMap<K, V>
     @Override
     protected ReferenceEntry<K, V> createEntry(final HashEntry<K, V> next, final int hashCode,
                                                final K key, final V value) {
-        return new ReferenceEntry<K, V>(this, next, hashCode, key, value);
+        return new ReferenceEntry<>(this, next, hashCode, key, value);
     }
 
     /**
@@ -479,7 +479,7 @@ public abstract class AbstractReferenceMap<K, V> extends AbstractHashedMap<K, V>
      */
     @Override
     protected Iterator<Map.Entry<K, V>> createEntrySetIterator() {
-        return new ReferenceEntrySetIterator<K, V>(this);
+        return new ReferenceEntrySetIterator<>(this);
     }
 
     /**
@@ -489,7 +489,7 @@ public abstract class AbstractReferenceMap<K, V> extends AbstractHashedMap<K, V>
      */
     @Override
     protected Iterator<K> createKeySetIterator() {
-        return new ReferenceKeySetIterator<K>(this);
+        return new ReferenceKeySetIterator<>(this);
     }
 
     /**
@@ -499,7 +499,7 @@ public abstract class AbstractReferenceMap<K, V> extends AbstractHashedMap<K, V>
      */
     @Override
     protected Iterator<V> createValuesIterator() {
-        return new ReferenceValuesIterator<V>(this);
+        return new ReferenceValuesIterator<>(this);
     }
 
     //-----------------------------------------------------------------------
@@ -520,9 +520,9 @@ public abstract class AbstractReferenceMap<K, V> extends AbstractHashedMap<K, V>
         @Override
         public <T> T[] toArray(final T[] arr) {
             // special implementation to handle disappearing entries
-            final ArrayList<Map.Entry<K, V>> list = new ArrayList<Map.Entry<K, V>>(size());
+            final ArrayList<Map.Entry<K, V>> list = new ArrayList<>(size());
             for (final Map.Entry<K, V> entry : this) {
-                list.add(new DefaultMapEntry<K, V>(entry));
+                list.add(new DefaultMapEntry<>(entry));
             }
             return list.toArray(arr);
         }
@@ -546,7 +546,7 @@ public abstract class AbstractReferenceMap<K, V> extends AbstractHashedMap<K, V>
         @Override
         public <T> T[] toArray(final T[] arr) {
             // special implementation to handle disappearing keys
-            final List<K> list = new ArrayList<K>(size());
+            final List<K> list = new ArrayList<>(size());
             for (final K key : this) {
                 list.add(key);
             }
@@ -572,7 +572,7 @@ public abstract class AbstractReferenceMap<K, V> extends AbstractHashedMap<K, V>
         @Override
         public <T> T[] toArray(final T[] arr) {
             // special implementation to handle disappearing values
-            final List<V> list = new ArrayList<V>(size());
+            final List<V> list = new ArrayList<>(size());
             for (final V value : this) {
                 list.add(value);
             }
@@ -710,10 +710,10 @@ public abstract class AbstractReferenceMap<K, V> extends AbstractHashedMap<K, V>
                 return referent;
             }
             if (type == ReferenceStrength.SOFT) {
-                return new SoftRef<T>(hash, referent, parent.queue);
+                return new SoftRef<>(hash, referent, parent.queue);
             }
             if (type == ReferenceStrength.WEAK) {
-                return new WeakRef<T>(hash, referent, parent.queue);
+                return new WeakRef<>(hash, referent, parent.queue);
             }
             throw new Error();
         }

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/map/AbstractSortedMapDecorator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/map/AbstractSortedMapDecorator.java b/src/main/java/org/apache/commons/collections4/map/AbstractSortedMapDecorator.java
index d032197..1cb568f 100644
--- a/src/main/java/org/apache/commons/collections4/map/AbstractSortedMapDecorator.java
+++ b/src/main/java/org/apache/commons/collections4/map/AbstractSortedMapDecorator.java
@@ -124,7 +124,7 @@ public abstract class AbstractSortedMapDecorator<K, V> extends AbstractMapDecora
      */
     @Override
     public OrderedMapIterator<K, V> mapIterator() {
-        return new SortedMapIterator<K, V>(entrySet());
+        return new SortedMapIterator<>(entrySet());
     }
 
     /**
@@ -150,7 +150,7 @@ public abstract class AbstractSortedMapDecorator<K, V> extends AbstractMapDecora
         @Override
         public synchronized void reset() {
             super.reset();
-            iterator = new ListIteratorWrapper<Map.Entry<K, V>>(iterator);
+            iterator = new ListIteratorWrapper<>(iterator);
         }
 
         /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/map/CompositeMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/map/CompositeMap.java b/src/main/java/org/apache/commons/collections4/map/CompositeMap.java
index d5c4861..5f53bef 100644
--- a/src/main/java/org/apache/commons/collections4/map/CompositeMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/CompositeMap.java
@@ -251,7 +251,7 @@ public class CompositeMap<K, V> extends AbstractIterableMap<K, V> implements Ser
      */
     @Override
     public Set<Map.Entry<K, V>> entrySet() {
-        final CompositeSet<Map.Entry<K, V>> entries = new CompositeSet<Map.Entry<K,V>>();
+        final CompositeSet<Map.Entry<K, V>> entries = new CompositeSet<>();
         for (int i = composite.length - 1; i >= 0; --i) {
             entries.addComposited(composite[i].entrySet());
         }
@@ -324,7 +324,7 @@ public class CompositeMap<K, V> extends AbstractIterableMap<K, V> implements Ser
      */
     @Override
     public Set<K> keySet() {
-        final CompositeSet<K> keys = new CompositeSet<K>();
+        final CompositeSet<K> keys = new CompositeSet<>();
         for (int i = this.composite.length - 1; i >= 0; --i) {
             keys.addComposited(this.composite[i].keySet());
         }
@@ -460,7 +460,7 @@ public class CompositeMap<K, V> extends AbstractIterableMap<K, V> implements Ser
      */
     @Override
     public Collection<V> values() {
-        final CompositeCollection<V> values = new CompositeCollection<V>();
+        final CompositeCollection<V> values = new CompositeCollection<>();
         for (int i = composite.length - 1; i >= 0; --i) {
             values.addComposited(composite[i].values());
         }

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/map/DefaultedMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/map/DefaultedMap.java b/src/main/java/org/apache/commons/collections4/map/DefaultedMap.java
index 7c0d783..47a1e8a 100644
--- a/src/main/java/org/apache/commons/collections4/map/DefaultedMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/DefaultedMap.java
@@ -84,7 +84,7 @@ public class DefaultedMap<K, V> extends AbstractMapDecorator<K, V> implements Se
      * @since 4.0
      */
     public static <K, V> DefaultedMap<K, V> defaultedMap(final Map<K, V> map, final V defaultValue) {
-        return new DefaultedMap<K, V>(map, ConstantTransformer.constantTransformer(defaultValue));
+        return new DefaultedMap<>(map, ConstantTransformer.constantTransformer(defaultValue));
     }
 
     /**
@@ -105,7 +105,7 @@ public class DefaultedMap<K, V> extends AbstractMapDecorator<K, V> implements Se
         if (factory == null) {
             throw new IllegalArgumentException("Factory must not be null");
         }
-        return new DefaultedMap<K, V>(map, FactoryTransformer.factoryTransformer(factory));
+        return new DefaultedMap<>(map, FactoryTransformer.factoryTransformer(factory));
     }
 
     /**
@@ -128,7 +128,7 @@ public class DefaultedMap<K, V> extends AbstractMapDecorator<K, V> implements Se
         if (transformer == null) {
            throw new IllegalArgumentException("Transformer must not be null");
        }
-       return new DefaultedMap<K, V>(map, transformer);
+       return new DefaultedMap<>(map, transformer);
     }
 
     //-----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/map/FixedSizeMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/map/FixedSizeMap.java b/src/main/java/org/apache/commons/collections4/map/FixedSizeMap.java
index 706f5dc..4768b91 100644
--- a/src/main/java/org/apache/commons/collections4/map/FixedSizeMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/FixedSizeMap.java
@@ -70,7 +70,7 @@ public class FixedSizeMap<K, V>
      * @since 4.0
      */
     public static <K, V> FixedSizeMap<K, V> fixedSizeMap(final Map<K, V> map) {
-        return new FixedSizeMap<K, V>(map);
+        return new FixedSizeMap<>(map);
     }
 
     //-----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/map/FixedSizeSortedMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/map/FixedSizeSortedMap.java b/src/main/java/org/apache/commons/collections4/map/FixedSizeSortedMap.java
index fc7f31a..ac6feeb 100644
--- a/src/main/java/org/apache/commons/collections4/map/FixedSizeSortedMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/FixedSizeSortedMap.java
@@ -72,7 +72,7 @@ public class FixedSizeSortedMap<K, V>
      * @since 4.0
      */
     public static <K, V> FixedSizeSortedMap<K, V> fixedSizeSortedMap(final SortedMap<K, V> map) {
-        return new FixedSizeSortedMap<K, V>(map);
+        return new FixedSizeSortedMap<>(map);
     }
 
     //-----------------------------------------------------------------------
@@ -158,17 +158,17 @@ public class FixedSizeSortedMap<K, V>
     //-----------------------------------------------------------------------
     @Override
     public SortedMap<K, V> subMap(final K fromKey, final K toKey) {
-        return new FixedSizeSortedMap<K, V>(getSortedMap().subMap(fromKey, toKey));
+        return new FixedSizeSortedMap<>(getSortedMap().subMap(fromKey, toKey));
     }
 
     @Override
     public SortedMap<K, V> headMap(final K toKey) {
-        return new FixedSizeSortedMap<K, V>(getSortedMap().headMap(toKey));
+        return new FixedSizeSortedMap<>(getSortedMap().headMap(toKey));
     }
 
     @Override
     public SortedMap<K, V> tailMap(final K fromKey) {
-        return new FixedSizeSortedMap<K, V>(getSortedMap().tailMap(fromKey));
+        return new FixedSizeSortedMap<>(getSortedMap().tailMap(fromKey));
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/map/Flat3Map.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/map/Flat3Map.java b/src/main/java/org/apache/commons/collections4/map/Flat3Map.java
index caaf73a..62d91f9 100644
--- a/src/main/java/org/apache/commons/collections4/map/Flat3Map.java
+++ b/src/main/java/org/apache/commons/collections4/map/Flat3Map.java
@@ -432,7 +432,7 @@ public class Flat3Map<K, V> implements IterableMap<K, V>, Serializable, Cloneabl
      * @since 3.1
      */
     protected AbstractHashedMap<K, V> createDelegateMap() {
-        return new HashedMap<K, V>();
+        return new HashedMap<>();
     }
 
     /**
@@ -623,7 +623,7 @@ public class Flat3Map<K, V> implements IterableMap<K, V>, Serializable, Cloneabl
         if (size == 0) {
             return EmptyMapIterator.<K, V>emptyMapIterator();
         }
-        return new FlatMapIterator<K, V>(this);
+        return new FlatMapIterator<>(this);
     }
 
     /**
@@ -748,7 +748,7 @@ public class Flat3Map<K, V> implements IterableMap<K, V>, Serializable, Cloneabl
         if (delegateMap != null) {
             return delegateMap.entrySet();
         }
-        return new EntrySet<K, V>(this);
+        return new EntrySet<>(this);
     }
 
     /**
@@ -792,7 +792,7 @@ public class Flat3Map<K, V> implements IterableMap<K, V>, Serializable, Cloneabl
             if (parent.size() == 0) {
                 return EmptyIterator.<Map.Entry<K, V>>emptyIterator();
             }
-            return new EntrySetIterator<K, V>(parent);
+            return new EntrySetIterator<>(parent);
         }
     }
 
@@ -930,7 +930,7 @@ public class Flat3Map<K, V> implements IterableMap<K, V>, Serializable, Cloneabl
             if (!hasNext()) {
                 throw new NoSuchElementException(AbstractHashedMap.NO_NEXT_ENTRY);
             }
-            currentEntry = new FlatMapEntry<K, V>(parent, ++nextIndex);
+            currentEntry = new FlatMapEntry<>(parent, ++nextIndex);
             return currentEntry;
         }
 
@@ -972,7 +972,7 @@ public class Flat3Map<K, V> implements IterableMap<K, V>, Serializable, Cloneabl
         if (delegateMap != null) {
             return delegateMap.keySet();
         }
-        return new KeySet<K>(this);
+        return new KeySet<>(this);
     }
 
     /**
@@ -1016,7 +1016,7 @@ public class Flat3Map<K, V> implements IterableMap<K, V>, Serializable, Cloneabl
             if (parent.size() == 0) {
                 return EmptyIterator.<K>emptyIterator();
             }
-            return new KeySetIterator<K>(parent);
+            return new KeySetIterator<>(parent);
         }
     }
 
@@ -1048,7 +1048,7 @@ public class Flat3Map<K, V> implements IterableMap<K, V>, Serializable, Cloneabl
         if (delegateMap != null) {
             return delegateMap.values();
         }
-        return new Values<V>(this);
+        return new Values<>(this);
     }
 
     /**
@@ -1085,7 +1085,7 @@ public class Flat3Map<K, V> implements IterableMap<K, V>, Serializable, Cloneabl
             if (parent.size() == 0) {
                 return EmptyIterator.<V>emptyIterator();
             }
-            return new ValuesIterator<V>(parent);
+            return new ValuesIterator<>(parent);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/map/LazyMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/map/LazyMap.java b/src/main/java/org/apache/commons/collections4/map/LazyMap.java
index ba857bc..e254f08 100644
--- a/src/main/java/org/apache/commons/collections4/map/LazyMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/LazyMap.java
@@ -79,7 +79,7 @@ public class LazyMap<K, V> extends AbstractMapDecorator<K, V> implements Seriali
      * @since 4.0
      */
     public static <K, V> LazyMap<K, V> lazyMap(final Map<K, V> map, final Factory< ? extends V> factory) {
-        return new LazyMap<K,V>(map, factory);
+        return new LazyMap<>(map, factory);
     }
 
     /**
@@ -94,7 +94,7 @@ public class LazyMap<K, V> extends AbstractMapDecorator<K, V> implements Seriali
      * @since 4.0
      */
     public static <V, K> LazyMap<K, V> lazyMap(final Map<K, V> map, final Transformer<? super K, ? extends V> factory) {
-        return new LazyMap<K,V>(map, factory);
+        return new LazyMap<>(map, factory);
     }
 
     //-----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/map/LazySortedMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/map/LazySortedMap.java b/src/main/java/org/apache/commons/collections4/map/LazySortedMap.java
index dd536ec..ddaf9b6 100644
--- a/src/main/java/org/apache/commons/collections4/map/LazySortedMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/LazySortedMap.java
@@ -74,7 +74,7 @@ public class LazySortedMap<K,V> extends LazyMap<K,V> implements SortedMap<K,V> {
      */
     public static <K, V> LazySortedMap<K, V> lazySortedMap(final SortedMap<K, V> map,
                                                            final Factory<? extends V> factory) {
-        return new LazySortedMap<K,V>(map, factory);
+        return new LazySortedMap<>(map, factory);
     }
 
     /**
@@ -90,7 +90,7 @@ public class LazySortedMap<K,V> extends LazyMap<K,V> implements SortedMap<K,V> {
      */
     public static <K, V> LazySortedMap<K, V> lazySortedMap(final SortedMap<K, V> map,
                                                            final Transformer<? super K, ? extends V> factory) {
-        return new LazySortedMap<K,V>(map, factory);
+        return new LazySortedMap<>(map, factory);
     }
 
     //-----------------------------------------------------------------------
@@ -145,19 +145,19 @@ public class LazySortedMap<K,V> extends LazyMap<K,V> implements SortedMap<K,V> {
     @Override
     public SortedMap<K,V> subMap(final K fromKey, final K toKey) {
         final SortedMap<K,V> map = getSortedMap().subMap(fromKey, toKey);
-        return new LazySortedMap<K,V>(map, factory);
+        return new LazySortedMap<>(map, factory);
     }
 
     @Override
     public SortedMap<K,V> headMap(final K toKey) {
         final SortedMap<K,V> map = getSortedMap().headMap(toKey);
-        return new LazySortedMap<K,V>(map, factory);
+        return new LazySortedMap<>(map, factory);
     }
 
     @Override
     public SortedMap<K,V> tailMap(final K fromKey) {
         final SortedMap<K,V> map = getSortedMap().tailMap(fromKey);
-        return new LazySortedMap<K,V>(map, factory);
+        return new LazySortedMap<>(map, factory);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/map/LinkedMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/map/LinkedMap.java b/src/main/java/org/apache/commons/collections4/map/LinkedMap.java
index 9ccf7f0..d025282 100644
--- a/src/main/java/org/apache/commons/collections4/map/LinkedMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/LinkedMap.java
@@ -200,7 +200,7 @@ public class LinkedMap<K, V> extends AbstractLinkedMap<K, V> implements Serializ
      * @return The ordered list of keys.
      */
     public List<K> asList() {
-        return new LinkedMapList<K>(this);
+        return new LinkedMapList<>(this);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/map/ListOrderedMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/map/ListOrderedMap.java b/src/main/java/org/apache/commons/collections4/map/ListOrderedMap.java
index 867c171..4511e01 100644
--- a/src/main/java/org/apache/commons/collections4/map/ListOrderedMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/ListOrderedMap.java
@@ -83,7 +83,7 @@ public class ListOrderedMap<K, V>
     private static final long serialVersionUID = 2728177751851003750L;
 
     /** Internal list to hold the sequence of objects */
-    private final List<K> insertOrder = new ArrayList<K>();
+    private final List<K> insertOrder = new ArrayList<>();
 
     /**
      * Factory method to create an ordered map.
@@ -98,7 +98,7 @@ public class ListOrderedMap<K, V>
      * @since 4.0
      */
     public static <K, V> ListOrderedMap<K, V> listOrderedMap(final Map<K, V> map) {
-        return new ListOrderedMap<K, V>(map);
+        return new ListOrderedMap<>(map);
     }
 
     //-----------------------------------------------------------------------
@@ -154,7 +154,7 @@ public class ListOrderedMap<K, V>
     //-----------------------------------------------------------------------
     @Override
     public OrderedMapIterator<K, V> mapIterator() {
-        return new ListOrderedMapIterator<K, V>(this);
+        return new ListOrderedMapIterator<>(this);
     }
 
     /**
@@ -292,7 +292,7 @@ public class ListOrderedMap<K, V>
      */
     @Override
     public Set<K> keySet() {
-        return new KeySetView<K>(this);
+        return new KeySetView<>(this);
     }
 
     /**
@@ -322,7 +322,7 @@ public class ListOrderedMap<K, V>
      */
     @Override
     public Collection<V> values() {
-        return new ValuesView<V>(this);
+        return new ValuesView<>(this);
     }
 
     /**
@@ -336,7 +336,7 @@ public class ListOrderedMap<K, V>
      * @since 3.2
      */
     public List<V> valueList() {
-        return new ValuesView<V>(this);
+        return new ValuesView<>(this);
     }
 
     /**
@@ -348,7 +348,7 @@ public class ListOrderedMap<K, V>
      */
     @Override
     public Set<Map.Entry<K, V>> entrySet() {
-        return new EntrySetView<K, V>(this, this.insertOrder);
+        return new EntrySetView<>(this, this.insertOrder);
     }
 
     //-----------------------------------------------------------------------
@@ -665,7 +665,7 @@ public class ListOrderedMap<K, V>
 
         @Override
         public Iterator<Map.Entry<K, V>> iterator() {
-            return new ListOrderedIterator<K, V>(parent, insertOrder);
+            return new ListOrderedIterator<>(parent, insertOrder);
         }
     }
 
@@ -682,7 +682,7 @@ public class ListOrderedMap<K, V>
         @Override
         public Map.Entry<K, V> next() {
             last = getIterator().next();
-            return new ListOrderedMapEntry<K, V>(parent, last);
+            return new ListOrderedMapEntry<>(parent, last);
         }
 
         @Override

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/map/MultiKeyMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/map/MultiKeyMap.java b/src/main/java/org/apache/commons/collections4/map/MultiKeyMap.java
index ab3f830..be4ccbf 100644
--- a/src/main/java/org/apache/commons/collections4/map/MultiKeyMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/MultiKeyMap.java
@@ -100,7 +100,7 @@ public class MultiKeyMap<K, V> extends AbstractMapDecorator<MultiKey<? extends K
         if (map.size() > 0) {
             throw new IllegalArgumentException("Map must be empty");
         }
-        return new MultiKeyMap<K, V>(map);
+        return new MultiKeyMap<>(map);
     }
 
     //-----------------------------------------------------------------------
@@ -185,7 +185,7 @@ public class MultiKeyMap<K, V> extends AbstractMapDecorator<MultiKey<? extends K
             }
             entry = entry.next;
         }
-        decorated().addMapping(index, hashCode, new MultiKey<K>(key1, key2), value);
+        decorated().addMapping(index, hashCode, new MultiKey<>(key1, key2), value);
         return null;
     }
 
@@ -317,7 +317,7 @@ public class MultiKeyMap<K, V> extends AbstractMapDecorator<MultiKey<? extends K
             }
             entry = entry.next;
         }
-        decorated().addMapping(index, hashCode, new MultiKey<K>(key1, key2, key3), value);
+        decorated().addMapping(index, hashCode, new MultiKey<>(key1, key2, key3), value);
         return null;
     }
 
@@ -459,7 +459,7 @@ public class MultiKeyMap<K, V> extends AbstractMapDecorator<MultiKey<? extends K
             }
             entry = entry.next;
         }
-        decorated().addMapping(index, hashCode, new MultiKey<K>(key1, key2, key3, key4), value);
+        decorated().addMapping(index, hashCode, new MultiKey<>(key1, key2, key3, key4), value);
         return null;
     }
 
@@ -612,7 +612,7 @@ public class MultiKeyMap<K, V> extends AbstractMapDecorator<MultiKey<? extends K
             }
             entry = entry.next;
         }
-        decorated().addMapping(index, hashCode, new MultiKey<K>(key1, key2, key3, key4, key5), value);
+        decorated().addMapping(index, hashCode, new MultiKey<>(key1, key2, key3, key4, key5), value);
         return null;
     }
 

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/map/MultiValueMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/map/MultiValueMap.java b/src/main/java/org/apache/commons/collections4/map/MultiValueMap.java
index 3c690ab..58c2bf0 100644
--- a/src/main/java/org/apache/commons/collections4/map/MultiValueMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/MultiValueMap.java
@@ -103,7 +103,7 @@ public class MultiValueMap<K, V> extends AbstractMapDecorator<K, Object> impleme
      */
     public static <K, V, C extends Collection<V>> MultiValueMap<K, V> multiValueMap(final Map<K, ? super C> map,
                                                                                     final Class<C> collectionClass) {
-        return new MultiValueMap<K, V>(map, new ReflectionFactory<C>(collectionClass));
+        return new MultiValueMap<>(map, new ReflectionFactory<>(collectionClass));
     }
 
     /**
@@ -120,7 +120,7 @@ public class MultiValueMap<K, V> extends AbstractMapDecorator<K, Object> impleme
      */
     public static <K, V, C extends Collection<V>> MultiValueMap<K, V> multiValueMap(final Map<K, ? super C> map,
             final Factory<C> collectionFactory) {
-        return new MultiValueMap<K, V>(map, collectionFactory);
+        return new MultiValueMap<>(map, collectionFactory);
     }
 
     //-----------------------------------------------------------------------
@@ -423,7 +423,7 @@ public class MultiValueMap<K, V> extends AbstractMapDecorator<K, Object> impleme
      * @since 4.0
      */
     public Iterator<Entry<K, V>> iterator() {
-        final Collection<K> allKeys = new ArrayList<K>(keySet());
+        final Collection<K> allKeys = new ArrayList<>(keySet());
         final Iterator<K> keyIterator = allKeys.iterator();
 
         return new LazyIteratorChain<Entry<K, V>>() {
@@ -452,7 +452,7 @@ public class MultiValueMap<K, V> extends AbstractMapDecorator<K, Object> impleme
                         };
                     }
                 };
-                return new TransformIterator<V, Entry<K, V>>(new ValuesIterator(key), transformer);
+                return new TransformIterator<>(new ValuesIterator(key), transformer);
             }
         };
     }
@@ -491,7 +491,7 @@ public class MultiValueMap<K, V> extends AbstractMapDecorator<K, Object> impleme
     private class Values extends AbstractCollection<V> {
         @Override
         public Iterator<V> iterator() {
-            final IteratorChain<V> chain = new IteratorChain<V>();
+            final IteratorChain<V> chain = new IteratorChain<>();
             for (final K k : keySet()) {
                 chain.addIterator(new ValuesIterator(k));
             }

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/map/PassiveExpiringMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/map/PassiveExpiringMap.java b/src/main/java/org/apache/commons/collections4/map/PassiveExpiringMap.java
index 16ae3b8..b7343d3 100644
--- a/src/main/java/org/apache/commons/collections4/map/PassiveExpiringMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/PassiveExpiringMap.java
@@ -200,7 +200,7 @@ public class PassiveExpiringMap<K, V>
     }
 
     /** map used to manage expiration times for the actual map entries. */
-    private final Map<Object, Long> expirationMap = new HashMap<Object, Long>();
+    private final Map<Object, Long> expirationMap = new HashMap<>();
 
     /** the policy used to determine time-to-live values for map entries. */
     private final ExpirationPolicy<K, V> expiringPolicy;

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/map/PredicatedMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/map/PredicatedMap.java b/src/main/java/org/apache/commons/collections4/map/PredicatedMap.java
index d895fa7..948cd73 100644
--- a/src/main/java/org/apache/commons/collections4/map/PredicatedMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/PredicatedMap.java
@@ -78,7 +78,7 @@ public class PredicatedMap<K, V>
     public static <K, V> PredicatedMap<K, V> predicatedMap(final Map<K, V> map,
                                                            final Predicate<? super K> keyPredicate,
                                                            final Predicate<? super V> valuePredicate) {
-        return new PredicatedMap<K, V>(map, keyPredicate, valuePredicate);
+        return new PredicatedMap<>(map, keyPredicate, valuePredicate);
     }
 
     //-----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/map/PredicatedSortedMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/map/PredicatedSortedMap.java b/src/main/java/org/apache/commons/collections4/map/PredicatedSortedMap.java
index 11f1e4b..935654e 100644
--- a/src/main/java/org/apache/commons/collections4/map/PredicatedSortedMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/PredicatedSortedMap.java
@@ -70,7 +70,7 @@ public class PredicatedSortedMap<K, V> extends PredicatedMap<K, V> implements So
      */
     public static <K, V> PredicatedSortedMap<K, V> predicatedSortedMap(final SortedMap<K, V> map,
             final Predicate<? super K> keyPredicate, final Predicate<? super V> valuePredicate) {
-        return new PredicatedSortedMap<K, V>(map, keyPredicate, valuePredicate);
+        return new PredicatedSortedMap<>(map, keyPredicate, valuePredicate);
     }
 
     //-----------------------------------------------------------------------
@@ -116,19 +116,19 @@ public class PredicatedSortedMap<K, V> extends PredicatedMap<K, V> implements So
     @Override
     public SortedMap<K, V> subMap(final K fromKey, final K toKey) {
         final SortedMap<K, V> map = getSortedMap().subMap(fromKey, toKey);
-        return new PredicatedSortedMap<K, V>(map, keyPredicate, valuePredicate);
+        return new PredicatedSortedMap<>(map, keyPredicate, valuePredicate);
     }
 
     @Override
     public SortedMap<K, V> headMap(final K toKey) {
         final SortedMap<K, V> map = getSortedMap().headMap(toKey);
-        return new PredicatedSortedMap<K, V>(map, keyPredicate, valuePredicate);
+        return new PredicatedSortedMap<>(map, keyPredicate, valuePredicate);
     }
 
     @Override
     public SortedMap<K, V> tailMap(final K fromKey) {
         final SortedMap<K, V> map = getSortedMap().tailMap(fromKey);
-        return new PredicatedSortedMap<K, V>(map, keyPredicate, valuePredicate);
+        return new PredicatedSortedMap<>(map, keyPredicate, valuePredicate);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/map/SingletonMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/map/SingletonMap.java b/src/main/java/org/apache/commons/collections4/map/SingletonMap.java
index 342d4eb..ff83737 100644
--- a/src/main/java/org/apache/commons/collections4/map/SingletonMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/SingletonMap.java
@@ -318,7 +318,7 @@ public class SingletonMap<K, V>
      */
     @Override
     public Set<Map.Entry<K, V>> entrySet() {
-        final Map.Entry<K, V> entry = new TiedMapEntry<K, V>(this, getKey());
+        final Map.Entry<K, V> entry = new TiedMapEntry<>(this, getKey());
         return Collections.singleton(entry);
     }
 
@@ -343,7 +343,7 @@ public class SingletonMap<K, V>
      */
     @Override
     public Collection<V> values() {
-        return new SingletonValues<V>(this);
+        return new SingletonValues<>(this);
     }
 
     /**
@@ -351,7 +351,7 @@ public class SingletonMap<K, V>
      */
     @Override
     public OrderedMapIterator<K, V> mapIterator() {
-        return new SingletonMapIterator<K, V>(this);
+        return new SingletonMapIterator<>(this);
     }
 
     /**
@@ -534,7 +534,7 @@ public class SingletonMap<K, V>
         }
         @Override
         public Iterator<V> iterator() {
-            return new SingletonIterator<V>(parent.getValue(), false);
+            return new SingletonIterator<>(parent.getValue(), false);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/map/StaticBucketMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/map/StaticBucketMap.java b/src/main/java/org/apache/commons/collections4/map/StaticBucketMap.java
index 10bb1d7..a62197d 100644
--- a/src/main/java/org/apache/commons/collections4/map/StaticBucketMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/StaticBucketMap.java
@@ -281,7 +281,7 @@ public final class StaticBucketMap<K, V> extends AbstractIterableMap<K, V> {
             Node<K, V> n = buckets[hash];
 
             if (n == null) {
-                n = new Node<K, V>();
+                n = new Node<>();
                 n.key = key;
                 n.value = value;
                 buckets[hash] = n;
@@ -304,7 +304,7 @@ public final class StaticBucketMap<K, V> extends AbstractIterableMap<K, V> {
 
             // The key was not found in the current list of nodes, add it to the end
             //  in a new node.
-            final Node<K, V> newNode = new Node<K, V>();
+            final Node<K, V> newNode = new Node<>();
             newNode.key = key;
             newNode.value = value;
             n.next = newNode;
@@ -504,7 +504,7 @@ public final class StaticBucketMap<K, V> extends AbstractIterableMap<K, V> {
 
     //-----------------------------------------------------------------------
     private class BaseIterator {
-        private final ArrayList<Map.Entry<K, V>> current = new ArrayList<Map.Entry<K,V>>();
+        private final ArrayList<Map.Entry<K, V>> current = new ArrayList<>();
         private int bucket;
         private Map.Entry<K, V> last;
 

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/map/TransformedMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/map/TransformedMap.java b/src/main/java/org/apache/commons/collections4/map/TransformedMap.java
index 5b57bc6..4a88259 100644
--- a/src/main/java/org/apache/commons/collections4/map/TransformedMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/TransformedMap.java
@@ -76,7 +76,7 @@ public class TransformedMap<K, V>
     public static <K, V> TransformedMap<K, V> transformingMap(final Map<K, V> map,
             final Transformer<? super K, ? extends K> keyTransformer,
             final Transformer<? super V, ? extends V> valueTransformer) {
-        return new TransformedMap<K, V>(map, keyTransformer, valueTransformer);
+        return new TransformedMap<>(map, keyTransformer, valueTransformer);
     }
 
     /**
@@ -99,7 +99,7 @@ public class TransformedMap<K, V>
     public static <K, V> TransformedMap<K, V> transformedMap(final Map<K, V> map,
             final Transformer<? super K, ? extends K> keyTransformer,
             final Transformer<? super V, ? extends V> valueTransformer) {
-        final TransformedMap<K, V> decorated = new TransformedMap<K, V>(map, keyTransformer, valueTransformer);
+        final TransformedMap<K, V> decorated = new TransformedMap<>(map, keyTransformer, valueTransformer);
         if (map.size() > 0) {
             final Map<K, V> transformed = decorated.transformMap(map);
             decorated.clear();
@@ -198,7 +198,7 @@ public class TransformedMap<K, V>
         if (map.isEmpty()) {
             return (Map<K, V>) map;
         }
-        final Map<K, V> result = new LinkedMap<K, V>(map.size());
+        final Map<K, V> result = new LinkedMap<>(map.size());
 
         for (final Map.Entry<? extends K, ? extends V> entry : map.entrySet()) {
             result.put(transformKey(entry.getKey()), transformValue(entry.getValue()));

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/map/TransformedSortedMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/map/TransformedSortedMap.java b/src/main/java/org/apache/commons/collections4/map/TransformedSortedMap.java
index 5675611..04273a3 100644
--- a/src/main/java/org/apache/commons/collections4/map/TransformedSortedMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/TransformedSortedMap.java
@@ -66,7 +66,7 @@ public class TransformedSortedMap<K, V>
     public static <K, V> TransformedSortedMap<K, V> transformingSortedMap(final SortedMap<K, V> map,
             final Transformer<? super K, ? extends K> keyTransformer,
             final Transformer<? super V, ? extends V> valueTransformer) {
-        return new TransformedSortedMap<K, V>(map, keyTransformer, valueTransformer);
+        return new TransformedSortedMap<>(map, keyTransformer, valueTransformer);
     }
 
     /**
@@ -91,7 +91,7 @@ public class TransformedSortedMap<K, V>
             final Transformer<? super V, ? extends V> valueTransformer) {
 
         final TransformedSortedMap<K, V> decorated =
-                new TransformedSortedMap<K, V>(map, keyTransformer, valueTransformer);
+                new TransformedSortedMap<>(map, keyTransformer, valueTransformer);
         if (map.size() > 0) {
             final Map<K, V> transformed = decorated.transformMap(map);
             decorated.clear();
@@ -147,19 +147,19 @@ public class TransformedSortedMap<K, V>
     @Override
     public SortedMap<K, V> subMap(final K fromKey, final K toKey) {
         final SortedMap<K, V> map = getSortedMap().subMap(fromKey, toKey);
-        return new TransformedSortedMap<K, V>(map, keyTransformer, valueTransformer);
+        return new TransformedSortedMap<>(map, keyTransformer, valueTransformer);
     }
 
     @Override
     public SortedMap<K, V> headMap(final K toKey) {
         final SortedMap<K, V> map = getSortedMap().headMap(toKey);
-        return new TransformedSortedMap<K, V>(map, keyTransformer, valueTransformer);
+        return new TransformedSortedMap<>(map, keyTransformer, valueTransformer);
     }
 
     @Override
     public SortedMap<K, V> tailMap(final K fromKey) {
         final SortedMap<K, V> map = getSortedMap().tailMap(fromKey);
-        return new TransformedSortedMap<K, V>(map, keyTransformer, valueTransformer);
+        return new TransformedSortedMap<>(map, keyTransformer, valueTransformer);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/map/UnmodifiableEntrySet.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/map/UnmodifiableEntrySet.java b/src/main/java/org/apache/commons/collections4/map/UnmodifiableEntrySet.java
index 99683f6..088f1f8 100644
--- a/src/main/java/org/apache/commons/collections4/map/UnmodifiableEntrySet.java
+++ b/src/main/java/org/apache/commons/collections4/map/UnmodifiableEntrySet.java
@@ -55,7 +55,7 @@ public final class UnmodifiableEntrySet<K, V>
         if (set instanceof Unmodifiable) {
             return set;
         }
-        return new UnmodifiableEntrySet<K, V>(set);
+        return new UnmodifiableEntrySet<>(set);
     }
 
     //-----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/map/UnmodifiableMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/map/UnmodifiableMap.java b/src/main/java/org/apache/commons/collections4/map/UnmodifiableMap.java
index c702363..6237b78 100644
--- a/src/main/java/org/apache/commons/collections4/map/UnmodifiableMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/UnmodifiableMap.java
@@ -65,7 +65,7 @@ public final class UnmodifiableMap<K, V>
             final Map<K, V> tmpMap = (Map<K, V>) map;
             return tmpMap;
         }
-        return new UnmodifiableMap<K, V>(map);
+        return new UnmodifiableMap<>(map);
     }
 
     //-----------------------------------------------------------------------
@@ -134,7 +134,7 @@ public final class UnmodifiableMap<K, V>
             final MapIterator<K, V> it = ((IterableMap<K, V>) map).mapIterator();
             return UnmodifiableMapIterator.unmodifiableMapIterator(it);
         }
-        final MapIterator<K, V> it = new EntrySetMapIterator<K, V>(map);
+        final MapIterator<K, V> it = new EntrySetMapIterator<>(map);
         return UnmodifiableMapIterator.unmodifiableMapIterator(it);
     }
 

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/map/UnmodifiableOrderedMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/map/UnmodifiableOrderedMap.java b/src/main/java/org/apache/commons/collections4/map/UnmodifiableOrderedMap.java
index 848961c..c180a23 100644
--- a/src/main/java/org/apache/commons/collections4/map/UnmodifiableOrderedMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/UnmodifiableOrderedMap.java
@@ -63,7 +63,7 @@ public final class UnmodifiableOrderedMap<K, V> extends AbstractOrderedMapDecora
             final OrderedMap<K, V> tmpMap = (OrderedMap<K, V>) map;
             return tmpMap;
         }
-        return new UnmodifiableOrderedMap<K, V>(map);
+        return new UnmodifiableOrderedMap<>(map);
     }
 
     //-----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/map/UnmodifiableSortedMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/map/UnmodifiableSortedMap.java b/src/main/java/org/apache/commons/collections4/map/UnmodifiableSortedMap.java
index 683aba8..78bfe87 100644
--- a/src/main/java/org/apache/commons/collections4/map/UnmodifiableSortedMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/UnmodifiableSortedMap.java
@@ -63,7 +63,7 @@ public final class UnmodifiableSortedMap<K, V>
             final SortedMap<K, V> tmpMap = (SortedMap<K, V>) map;
             return tmpMap;
         }
-        return new UnmodifiableSortedMap<K, V>(map);
+        return new UnmodifiableSortedMap<>(map);
     }
 
     //-----------------------------------------------------------------------
@@ -159,17 +159,17 @@ public final class UnmodifiableSortedMap<K, V>
 
     @Override
     public SortedMap<K, V> subMap(final K fromKey, final K toKey) {
-        return new UnmodifiableSortedMap<K, V>(decorated().subMap(fromKey, toKey));
+        return new UnmodifiableSortedMap<>(decorated().subMap(fromKey, toKey));
     }
 
     @Override
     public SortedMap<K, V> headMap(final K toKey) {
-        return new UnmodifiableSortedMap<K, V>(decorated().headMap(toKey));
+        return new UnmodifiableSortedMap<>(decorated().headMap(toKey));
     }
 
     @Override
     public SortedMap<K, V> tailMap(final K fromKey) {
-        return new UnmodifiableSortedMap<K, V>(decorated().tailMap(fromKey));
+        return new UnmodifiableSortedMap<>(decorated().tailMap(fromKey));
     }
 
 }

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMap.java b/src/main/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMap.java
index dbb5cc2..f4c97fb 100644
--- a/src/main/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMap.java
+++ b/src/main/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMap.java
@@ -619,7 +619,7 @@ public abstract class AbstractMultiValuedMap<K, V> implements MultiValuedMap<K,
         public Iterator<Entry<K, V>> iterator() {
             return new LazyIteratorChain<Entry<K, V>>() {
 
-                final Collection<K> keysCol = new ArrayList<K>(getMap().keySet());
+                final Collection<K> keysCol = new ArrayList<>(getMap().keySet());
                 final Iterator<K> keyIterator = keysCol.iterator();
 
                 @Override
@@ -636,7 +636,7 @@ public abstract class AbstractMultiValuedMap<K, V> implements MultiValuedMap<K,
                         }
 
                     };
-                    return new TransformIterator<V, Entry<K, V>>(new ValuesIterator(key), entryTransformer);
+                    return new TransformIterator<>(new ValuesIterator(key), entryTransformer);
                 }
             };
         }
@@ -725,7 +725,7 @@ public abstract class AbstractMultiValuedMap<K, V> implements MultiValuedMap<K,
     private class Values extends AbstractCollection<V> {
         @Override
         public Iterator<V> iterator() {
-            final IteratorChain<V> chain = new IteratorChain<V>();
+            final IteratorChain<V> chain = new IteratorChain<>();
             for (final K k : keySet()) {
                 chain.addIterator(new ValuesIterator(k));
             }
@@ -896,7 +896,7 @@ public abstract class AbstractMultiValuedMap<K, V> implements MultiValuedMap<K,
             public Map.Entry<K, Collection<V>> next() {
                 final Map.Entry<K, Collection<V>> entry = super.next();
                 final K key = entry.getKey();
-                return new UnmodifiableMapEntry<K, Collection<V>>(key, wrappedCollection(key));
+                return new UnmodifiableMapEntry<>(key, wrappedCollection(key));
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/multimap/ArrayListValuedHashMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/multimap/ArrayListValuedHashMap.java b/src/main/java/org/apache/commons/collections4/multimap/ArrayListValuedHashMap.java
index 41f1581..dfaf13b 100644
--- a/src/main/java/org/apache/commons/collections4/multimap/ArrayListValuedHashMap.java
+++ b/src/main/java/org/apache/commons/collections4/multimap/ArrayListValuedHashMap.java
@@ -114,7 +114,7 @@ public class ArrayListValuedHashMap<K, V> extends AbstractListValuedMap<K, V>
     // -----------------------------------------------------------------------
     @Override
     protected ArrayList<V> createCollection() {
-        return new ArrayList<V>(initialListCapacity);
+        return new ArrayList<>(initialListCapacity);
     }
 
     // -----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/multimap/HashSetValuedHashMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/multimap/HashSetValuedHashMap.java b/src/main/java/org/apache/commons/collections4/multimap/HashSetValuedHashMap.java
index c6fd845..a1ad0a9 100644
--- a/src/main/java/org/apache/commons/collections4/multimap/HashSetValuedHashMap.java
+++ b/src/main/java/org/apache/commons/collections4/multimap/HashSetValuedHashMap.java
@@ -113,7 +113,7 @@ public class HashSetValuedHashMap<K, V> extends AbstractSetValuedMap<K, V>
     // -----------------------------------------------------------------------
     @Override
     protected HashSet<V> createCollection() {
-        return new HashSet<V>(initialSetCapacity);
+        return new HashSet<>(initialSetCapacity);
     }
 
     // -----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/multimap/TransformedMultiValuedMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/multimap/TransformedMultiValuedMap.java b/src/main/java/org/apache/commons/collections4/multimap/TransformedMultiValuedMap.java
index 93a4a8b..acef611 100644
--- a/src/main/java/org/apache/commons/collections4/multimap/TransformedMultiValuedMap.java
+++ b/src/main/java/org/apache/commons/collections4/multimap/TransformedMultiValuedMap.java
@@ -66,7 +66,7 @@ public class TransformedMultiValuedMap<K, V> extends AbstractMultiValuedMapDecor
     public static <K, V> TransformedMultiValuedMap<K, V> transformingMap(final MultiValuedMap<K, V> map,
             final Transformer<? super K, ? extends K> keyTransformer,
             final Transformer<? super V, ? extends V> valueTransformer) {
-        return new TransformedMultiValuedMap<K, V>(map, keyTransformer, valueTransformer);
+        return new TransformedMultiValuedMap<>(map, keyTransformer, valueTransformer);
     }
 
     /**
@@ -89,9 +89,9 @@ public class TransformedMultiValuedMap<K, V> extends AbstractMultiValuedMapDecor
             final Transformer<? super K, ? extends K> keyTransformer,
             final Transformer<? super V, ? extends V> valueTransformer) {
         final TransformedMultiValuedMap<K, V> decorated =
-                new TransformedMultiValuedMap<K, V>(map, keyTransformer, valueTransformer);
+                new TransformedMultiValuedMap<>(map, keyTransformer, valueTransformer);
         if (!map.isEmpty()) {
-            final MultiValuedMap<K, V> mapCopy = new ArrayListValuedHashMap<K, V>(map);
+            final MultiValuedMap<K, V> mapCopy = new ArrayListValuedHashMap<>(map);
             decorated.clear();
             decorated.putAll(mapCopy);
         }

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/multimap/UnmodifiableMultiValuedMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/multimap/UnmodifiableMultiValuedMap.java b/src/main/java/org/apache/commons/collections4/multimap/UnmodifiableMultiValuedMap.java
index d18e8e8..2370b1a 100644
--- a/src/main/java/org/apache/commons/collections4/multimap/UnmodifiableMultiValuedMap.java
+++ b/src/main/java/org/apache/commons/collections4/multimap/UnmodifiableMultiValuedMap.java
@@ -65,7 +65,7 @@ public final class UnmodifiableMultiValuedMap<K, V>
         if (map instanceof Unmodifiable) {
             return (UnmodifiableMultiValuedMap<K, V>) map;
         }
-        return new UnmodifiableMultiValuedMap<K, V>(map);
+        return new UnmodifiableMultiValuedMap<>(map);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/eef8f1a0/src/main/java/org/apache/commons/collections4/multiset/AbstractMapMultiSet.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/multiset/AbstractMapMultiSet.java b/src/main/java/org/apache/commons/collections4/multiset/AbstractMapMultiSet.java
index 0336f28..d0f22cf 100644
--- a/src/main/java/org/apache/commons/collections4/multiset/AbstractMapMultiSet.java
+++ b/src/main/java/org/apache/commons/collections4/multiset/AbstractMapMultiSet.java
@@ -145,7 +145,7 @@ public abstract class AbstractMapMultiSet<E> extends AbstractMultiSet<E> {
      */
     @Override
     public Iterator<E> iterator() {
-        return new MapBasedMultiSetIterator<E>(this);
+        return new MapBasedMultiSetIterator<>(this);
     }
 
     /**
@@ -303,7 +303,7 @@ public abstract class AbstractMapMultiSet<E> extends AbstractMultiSet<E> {
     //-----------------------------------------------------------------------
     @Override
     protected Iterator<E> createUniqueSetIterator() {
-        return new UniqueSetIterator<E>(getMap().keySet().iterator(), this);
+        return new UniqueSetIterator<>(getMap().keySet().iterator(), this);
     }
 
     @Override
@@ -313,7 +313,7 @@ public abstract class AbstractMapMultiSet<E> extends AbstractMultiSet<E> {
 
     @Override
     protected Iterator<Entry<E>> createEntrySetIterator() {
-        return new EntrySetIterator<E>(map.entrySet().iterator(), this);
+        return new EntrySetIterator<>(map.entrySet().iterator(), this);
     }
 
     //-----------------------------------------------------------------------
@@ -395,7 +395,7 @@ public abstract class AbstractMapMultiSet<E> extends AbstractMultiSet<E> {
 
         @Override
         public Entry<E> next() {
-            last = new MultiSetEntry<E>(decorated.next());
+            last = new MultiSetEntry<>(decorated.next());
             canRemove = true;
             return last;
         }


Mime
View raw message