Checkstyle fixes.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1369925 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Thomas Neidhart 2012-08-06 19:11:31 +00:00
parent f70c2a72ee
commit cf940ca403
13 changed files with 47 additions and 15 deletions

View File

@ -43,5 +43,4 @@ public abstract class AbstractEmptyMapIterator<K, V> extends AbstractEmptyIterat
throw new IllegalStateException("Iterator contains no elements");
}
}
}

View File

@ -39,6 +39,7 @@ public abstract class AbstractIteratorDecorator<E> extends AbstractUntypedIterat
super(iterator);
}
/** {@inheritDoc} */
public E next() {
return getIterator().next();
}

View File

@ -56,38 +56,48 @@ public class AbstractListIteratorDecorator<E> implements ListIterator<E> {
}
//-----------------------------------------------------------------------
/** {@inheritDoc} */
public boolean hasNext() {
return iterator.hasNext();
}
/** {@inheritDoc} */
public E next() {
return iterator.next();
}
/** {@inheritDoc} */
public int nextIndex() {
return iterator.nextIndex();
}
/** {@inheritDoc} */
public boolean hasPrevious() {
return iterator.hasPrevious();
}
/** {@inheritDoc} */
public E previous() {
return iterator.previous();
}
/** {@inheritDoc} */
public int previousIndex() {
return iterator.previousIndex();
}
/** {@inheritDoc} */
public void remove() {
iterator.remove();
}
/** {@inheritDoc} */
public void set(E obj) {
iterator.set(obj);
}
/** {@inheritDoc} */
public void add(E obj) {
iterator.add(obj);
}

View File

@ -56,26 +56,33 @@ public class AbstractMapIteratorDecorator<K, V> implements MapIterator<K, V> {
}
//-----------------------------------------------------------------------
/** {@inheritDoc} */
public boolean hasNext() {
return iterator.hasNext();
}
/** {@inheritDoc} */
public K next() {
return iterator.next();
}
/** {@inheritDoc} */
public void remove() {
iterator.remove();
}
/** {@inheritDoc} */
public K getKey() {
return iterator.getKey();
}
/** {@inheritDoc} */
public V getValue() {
return iterator.getValue();
}
/** {@inheritDoc} */
public V setValue(V obj) {
return iterator.setValue(obj);
}

View File

@ -56,34 +56,43 @@ public class AbstractOrderedMapIteratorDecorator<K, V> implements OrderedMapIter
}
//-----------------------------------------------------------------------
/** {@inheritDoc} */
public boolean hasNext() {
return iterator.hasNext();
}
/** {@inheritDoc} */
public K next() {
return iterator.next();
}
/** {@inheritDoc} */
public boolean hasPrevious() {
return iterator.hasPrevious();
}
/** {@inheritDoc} */
public K previous() {
return iterator.previous();
}
/** {@inheritDoc} */
public void remove() {
iterator.remove();
}
/** {@inheritDoc} */
public K getKey() {
return iterator.getKey();
}
/** {@inheritDoc} */
public V getValue() {
return iterator.getValue();
}
/** {@inheritDoc} */
public V setValue(V obj) {
return iterator.setValue(obj);
}

View File

@ -113,7 +113,8 @@ public class CollatingIterator<E> implements Iterator<E> {
* @param b the second child ordered iterator
* @throws NullPointerException if either iterator is null
*/
public CollatingIterator(final Comparator<? super E> comp, final Iterator<? extends E> a, final Iterator<? extends E> b) {
public CollatingIterator(final Comparator<? super E> comp, final Iterator<? extends E> a,
final Iterator<? extends E> b) {
this(comp, 2);
addIterator(a);
addIterator(b);
@ -203,6 +204,8 @@ public class CollatingIterator<E> implements Iterator<E> {
/**
* Gets the {@link Comparator} by which collatation occurs.
*
* @return the {@link Comparator}
*/
public Comparator<? super E> getComparator() {
return comparator;
@ -215,6 +218,7 @@ public class CollatingIterator<E> implements Iterator<E> {
* {@link java.lang.Comparable} interface), then use the
* {@link org.apache.commons.collections.comparators.ComparableComparator}.
*
* @param comp the {@link Comparator} to set
* @throws IllegalStateException if iteration has started
*/
public void setComparator(final Comparator<? super E> comp) {

View File

@ -24,7 +24,7 @@ import org.apache.commons.collections.ResettableIterator;
* Provides an implementation of an empty iterator.
* <p>
* This class provides an implementation of an empty iterator.
* This class provides for binary compatability between Commons Collections
* This class provides for binary compatibility between Commons Collections
* 2.1.1 and 3.1 due to issues with <code>IteratorUtils</code>.
*
* @since 2.1.1 and 3.1
@ -46,7 +46,7 @@ public class EmptyIterator<E> extends AbstractEmptyIterator<E> implements Resett
/**
* Get a typed resettable empty iterator instance.
* @param <E>
* @param <E> the element type
* @return ResettableIterator<E>
*/
@SuppressWarnings("unchecked")
@ -56,7 +56,7 @@ public class EmptyIterator<E> extends AbstractEmptyIterator<E> implements Resett
/**
* Get a typed empty iterator instance.
* @param <E>
* @param <E> the element type
* @return Iterator<E>
*/
@SuppressWarnings("unchecked")

View File

@ -24,7 +24,7 @@ import org.apache.commons.collections.ResettableListIterator;
* Provides an implementation of an empty list iterator.
* <p>
* This class provides an implementation of an empty list iterator. This class
* provides for binary compatability between Commons Collections 2.1.1 and 3.1
* provides for binary compatibility between Commons Collections 2.1.1 and 3.1
* due to issues with <code>IteratorUtils</code>.
*
* @since 2.1.1 and 3.1
@ -47,7 +47,7 @@ public class EmptyListIterator<E> extends AbstractEmptyIterator<E> implements
/**
* Get a typed instance of the iterator.
* @param <E>
* @param <E> the element type
* @return {@link ResettableListIterator}<E>
*/
@SuppressWarnings("unchecked")
@ -57,7 +57,7 @@ public class EmptyListIterator<E> extends AbstractEmptyIterator<E> implements
/**
* Get a typed instance of the iterator.
* @param <E>
* @param <E> the element type
* @return {@link ListIterator}<E>
*/
@SuppressWarnings("unchecked")

View File

@ -36,8 +36,8 @@ public class EmptyMapIterator<K, V> extends AbstractEmptyMapIterator<K, V> imple
/**
* Get a typed instance of the iterator.
* @param <K>
* @param <V>
* @param <K> the key type
* @param <V> the value type
* @return {@link MapIterator}<K, V>
*/
@SuppressWarnings("unchecked")

View File

@ -36,7 +36,7 @@ public class EmptyOrderedIterator<E> extends AbstractEmptyIterator<E>
/**
* Typed instance of the iterator.
* @param <E>
* @param <E> the element type
* @return OrderedIterator<E>
*/
@SuppressWarnings("unchecked")

View File

@ -36,8 +36,8 @@ public class EmptyOrderedMapIterator<K, V> extends AbstractEmptyMapIterator<K, V
/**
* Get a typed instance of the iterator.
* @param <K>
* @param <V>
* @param <K> the key type
* @param <V> the value type
* @return {@link OrderedMapIterator}<K, V>
*/
@SuppressWarnings("unchecked")

View File

@ -76,6 +76,7 @@ public class LoopingIterator<E> implements ResettableIterator<E> {
* <p>
* If at the end of the collection, return the first element.
*
* @return the next object
* @throws NoSuchElementException if there are no elements
* at all. Use {@link #hasNext} to avoid this error.
*/

View File

@ -142,6 +142,7 @@ public class SingletonListIterator<E> implements ListIterator<E>, ResettableList
/**
* Add always throws {@link UnsupportedOperationException}.
*
* @param obj the object to add
* @throws UnsupportedOperationException always
*/
public void add(E obj) {