From 38bb9b4ac534abc95a83c75faf5e87cfe25319d4 Mon Sep 17 00:00:00 2001 From: Thomas Neidhart Date: Sun, 26 Aug 2012 19:23:25 +0000 Subject: [PATCH] Removed unneeded inheritDoc tags, formatting. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1377489 13f79535-47bb-0310-9956-ffa450edef68 --- .../collections/trie/SynchronizedTrie.java | 89 +---------------- .../collections/trie/UnmodifiableTrie.java | 99 ++----------------- 2 files changed, 9 insertions(+), 179 deletions(-) diff --git a/src/main/java/org/apache/commons/collections/trie/SynchronizedTrie.java b/src/main/java/org/apache/commons/collections/trie/SynchronizedTrie.java index 45f0ec65c..552a3560d 100644 --- a/src/main/java/org/apache/commons/collections/trie/SynchronizedTrie.java +++ b/src/main/java/org/apache/commons/collections/trie/SynchronizedTrie.java @@ -43,6 +43,8 @@ public class SynchronizedTrie implements Trie, Serializable { /** * Factory method to create a synchronized trie. * + * @param the key type + * @param the value type * @param trie the trie to decorate, must not be null * @return a new synchronized trie * @throws IllegalArgumentException if trie is null @@ -65,200 +67,115 @@ public class SynchronizedTrie implements Trie, Serializable { this.delegate = trie; } - /** - * {@inheritDoc} - */ - public synchronized Entry select(K key, - Cursor cursor) { + public synchronized Entry select(K key, Cursor cursor) { return delegate.select(key, cursor); } - /** - * {@inheritDoc} - */ public synchronized Entry select(K key) { return delegate.select(key); } - /** - * {@inheritDoc} - */ public synchronized K selectKey(K key) { return delegate.selectKey(key); } - /** - * {@inheritDoc} - */ public synchronized V selectValue(K key) { return delegate.selectValue(key); } - /** - * {@inheritDoc} - */ public synchronized Entry traverse(Cursor cursor) { return delegate.traverse(cursor); } - /** - * {@inheritDoc} - */ public synchronized Set> entrySet() { return SynchronizedSet.synchronizedSet(delegate.entrySet()); } - /** - * {@inheritDoc} - */ public synchronized Set keySet() { return SynchronizedSet.synchronizedSet(delegate.keySet()); } - /** - * {@inheritDoc} - */ public synchronized Collection values() { return SynchronizedCollection.synchronizedCollection(delegate.values()); } - /** - * {@inheritDoc} - */ public synchronized void clear() { delegate.clear(); } - /** - * {@inheritDoc} - */ public synchronized boolean containsKey(Object key) { return delegate.containsKey(key); } - /** - * {@inheritDoc} - */ public synchronized boolean containsValue(Object value) { return delegate.containsValue(value); } - /** - * {@inheritDoc} - */ public synchronized V get(Object key) { return delegate.get(key); } - /** - * {@inheritDoc} - */ public synchronized boolean isEmpty() { return delegate.isEmpty(); } - /** - * {@inheritDoc} - */ public synchronized V put(K key, V value) { return delegate.put(key, value); } - /** - * {@inheritDoc} - */ public synchronized void putAll(Map m) { delegate.putAll(m); } - /** - * {@inheritDoc} - */ public synchronized V remove(Object key) { return delegate.remove(key); } - /** - * {@inheritDoc} - */ public synchronized K lastKey() { return delegate.lastKey(); } - /** - * {@inheritDoc} - */ public synchronized SortedMap subMap(K fromKey, K toKey) { return Collections.synchronizedSortedMap(delegate.subMap(fromKey, toKey)); } - /** - * {@inheritDoc} - */ public synchronized SortedMap tailMap(K fromKey) { return Collections.synchronizedSortedMap(delegate.tailMap(fromKey)); } - /** - * {@inheritDoc} - */ public synchronized Comparator comparator() { return delegate.comparator(); } - /** - * {@inheritDoc} - */ public synchronized K firstKey() { return delegate.firstKey(); } - /** - * {@inheritDoc} - */ public synchronized SortedMap headMap(K toKey) { return Collections.synchronizedSortedMap(delegate.headMap(toKey)); } - /** - * {@inheritDoc} - */ public synchronized SortedMap getPrefixedBy(K key, int offset, int length) { return Collections.synchronizedSortedMap(delegate.getPrefixedBy(key, offset, length)); } - /** - * {@inheritDoc} - */ public synchronized SortedMap getPrefixedBy(K key, int length) { return Collections.synchronizedSortedMap(delegate.getPrefixedBy(key, length)); } - /** - * {@inheritDoc} - */ public synchronized SortedMap getPrefixedBy(K key) { return Collections.synchronizedSortedMap(delegate.getPrefixedBy(key)); } - /** - * {@inheritDoc} - */ public synchronized SortedMap getPrefixedByBits(K key, int lengthInBits) { return Collections.synchronizedSortedMap(delegate.getPrefixedByBits(key, lengthInBits)); } - /** - * {@inheritDoc} - */ public synchronized SortedMap getPrefixedByBits(K key, int offsetInBits, int lengthInBits) { return Collections.synchronizedSortedMap(delegate.getPrefixedByBits(key, offsetInBits, lengthInBits)); } - /** - * {@inheritDoc} - */ public synchronized int size() { return delegate.size(); } diff --git a/src/main/java/org/apache/commons/collections/trie/UnmodifiableTrie.java b/src/main/java/org/apache/commons/collections/trie/UnmodifiableTrie.java index 19d02a423..e3920f597 100644 --- a/src/main/java/org/apache/commons/collections/trie/UnmodifiableTrie.java +++ b/src/main/java/org/apache/commons/collections/trie/UnmodifiableTrie.java @@ -26,6 +26,8 @@ public class UnmodifiableTrie implements Trie, Serializable, Unmodif /** * Factory method to create a unmodifiable trie. * + * @param the key type + * @param the value type * @param trie the trie to decorate, must not be null * @return a new unmodifiable trie * @throws IllegalArgumentException if trie is null @@ -39,18 +41,15 @@ public class UnmodifiableTrie implements Trie, Serializable, Unmodif * Constructor that wraps (not copies). * * @param trie the trie to decorate, must not be null - * @throws IllegalArgumentException if set is null + * @throws IllegalArgumentException if trie is null */ public UnmodifiableTrie(Trie trie) { if (trie == null) { - throw new IllegalArgumentException("Collection must not be null"); + throw new IllegalArgumentException("Trie must not be null"); } this.delegate = trie; } - /** - * {@inheritDoc} - */ public Entry select(K key, final Cursor cursor) { Cursor c = new Cursor() { public Decision select(Map.Entry entry) { @@ -71,30 +70,18 @@ public class UnmodifiableTrie implements Trie, Serializable, Unmodif return delegate.select(key, c); } - /** - * {@inheritDoc} - */ public Entry select(K key) { return delegate.select(key); } - /** - * {@inheritDoc} - */ public K selectKey(K key) { return delegate.selectKey(key); } - /** - * {@inheritDoc} - */ public V selectValue(K key) { return delegate.selectValue(key); } - /** - * {@inheritDoc} - */ public Entry traverse(final Cursor cursor) { Cursor c = new Cursor() { public Decision select(Map.Entry entry) { @@ -115,177 +102,103 @@ public class UnmodifiableTrie implements Trie, Serializable, Unmodif return delegate.traverse(c); } - /** - * {@inheritDoc} - */ public Set> entrySet() { return Collections.unmodifiableSet(delegate.entrySet()); } - /** - * {@inheritDoc} - */ public Set keySet() { return Collections.unmodifiableSet(delegate.keySet()); } - /** - * {@inheritDoc} - */ public Collection values() { return Collections.unmodifiableCollection(delegate.values()); } - /** - * {@inheritDoc} - */ public void clear() { throw new UnsupportedOperationException(); } - /** - * {@inheritDoc} - */ public boolean containsKey(Object key) { return delegate.containsKey(key); } - /** - * {@inheritDoc} - */ public boolean containsValue(Object value) { return delegate.containsValue(value); } - /** - * {@inheritDoc} - */ public V get(Object key) { return delegate.get(key); } - /** - * {@inheritDoc} - */ public boolean isEmpty() { return delegate.isEmpty(); } - /** - * {@inheritDoc} - */ public V put(K key, V value) { throw new UnsupportedOperationException(); } - /** - * {@inheritDoc} - */ public void putAll(Map m) { throw new UnsupportedOperationException(); } - /** - * {@inheritDoc} - */ public V remove(Object key) { throw new UnsupportedOperationException(); } - /** - * {@inheritDoc} - */ public K firstKey() { return delegate.firstKey(); } - /** - * {@inheritDoc} - */ public SortedMap headMap(K toKey) { return Collections.unmodifiableSortedMap(delegate.headMap(toKey)); } - /** - * {@inheritDoc} - */ public K lastKey() { return delegate.lastKey(); } - /** - * {@inheritDoc} - */ public SortedMap subMap(K fromKey, K toKey) { return Collections.unmodifiableSortedMap( delegate.subMap(fromKey, toKey)); } - /** - * {@inheritDoc} - */ public SortedMap tailMap(K fromKey) { return Collections.unmodifiableSortedMap(delegate.tailMap(fromKey)); } - /** - * {@inheritDoc} - */ public SortedMap getPrefixedBy(K key, int offset, int length) { return Collections.unmodifiableSortedMap( delegate.getPrefixedBy(key, offset, length)); } - /** - * {@inheritDoc} - */ public SortedMap getPrefixedBy(K key, int length) { return Collections.unmodifiableSortedMap( delegate.getPrefixedBy(key, length)); } - /** - * {@inheritDoc} - */ public SortedMap getPrefixedBy(K key) { return Collections.unmodifiableSortedMap( delegate.getPrefixedBy(key)); } - /** - * {@inheritDoc} - */ public SortedMap getPrefixedByBits(K key, int lengthInBits) { return Collections.unmodifiableSortedMap( delegate.getPrefixedByBits(key, lengthInBits)); } - /** - * {@inheritDoc} - */ - public SortedMap getPrefixedByBits(K key, int offsetInBits, - int lengthInBits) { - return Collections.unmodifiableSortedMap( - delegate.getPrefixedByBits(key, offsetInBits, lengthInBits)); + public SortedMap getPrefixedByBits(K key, int offsetInBits, int lengthInBits) { + return Collections.unmodifiableSortedMap(delegate.getPrefixedByBits(key, offsetInBits, lengthInBits)); } - /** - * {@inheritDoc} - */ public Comparator comparator() { return delegate.comparator(); } - /** - * {@inheritDoc} - */ public int size() { return delegate.size(); } - /** - * {@inheritDoc} - */ public int hashCode() { return delegate.hashCode(); }