Remove trailing spaces.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1477765 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Thomas Neidhart 2013-04-30 18:37:37 +00:00
parent 6ee118d2a1
commit eef240cfdf
6 changed files with 28 additions and 28 deletions

View File

@ -44,7 +44,7 @@ public abstract class AbstractQueueDecorator<E> extends AbstractCollectionDecora
/** /**
* Constructor that wraps (not copies). * Constructor that wraps (not copies).
* *
* @param queue the queue to decorate, must not be null * @param queue the queue to decorate, must not be null
* @throws IllegalArgumentException if list is null * @throws IllegalArgumentException if list is null
*/ */
@ -54,7 +54,7 @@ public abstract class AbstractQueueDecorator<E> extends AbstractCollectionDecora
/** /**
* Gets the queue being decorated. * Gets the queue being decorated.
* *
* @return the decorated queue * @return the decorated queue
*/ */
@Override @Override
@ -79,7 +79,7 @@ public abstract class AbstractQueueDecorator<E> extends AbstractCollectionDecora
public E element() { public E element() {
return decorated().element(); return decorated().element();
} }
public E remove() { public E remove() {
return decorated().remove(); return decorated().remove();
} }

View File

@ -258,11 +258,11 @@ public class CircularFifoQueue<E> extends AbstractCollection<E>
String.format("The specified index (%1$d) is outside the available range [0, %2$d)", String.format("The specified index (%1$d) is outside the available range [0, %2$d)",
Integer.valueOf(index), Integer.valueOf(sz))); Integer.valueOf(index), Integer.valueOf(sz)));
} }
final int idx = (start + index) % maxElements; final int idx = (start + index) % maxElements;
return elements[idx]; return elements[idx];
} }
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
@ -411,5 +411,5 @@ public class CircularFifoQueue<E> extends AbstractCollection<E>
}; };
} }
} }

View File

@ -45,7 +45,7 @@ public class PredicatedQueue<E> extends PredicatedCollection<E> implements Queue
* <p> * <p>
* If there are any elements already in the queue being decorated, they * If there are any elements already in the queue being decorated, they
* are validated. * are validated.
* *
* @param <E> the type of the elements in the queue * @param <E> the type of the elements in the queue
* @param Queue the queue to decorate, must not be null * @param Queue the queue to decorate, must not be null
* @param predicate the predicate to use for validation, must not be null * @param predicate the predicate to use for validation, must not be null
@ -57,14 +57,14 @@ public class PredicatedQueue<E> extends PredicatedCollection<E> implements Queue
final Predicate<? super E> predicate) { final Predicate<? super E> predicate) {
return new PredicatedQueue<E>(Queue, predicate); return new PredicatedQueue<E>(Queue, predicate);
} }
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* Constructor that wraps (not copies). * Constructor that wraps (not copies).
* <p> * <p>
* If there are any elements already in the collection being decorated, they * If there are any elements already in the collection being decorated, they
* are validated. * are validated.
* *
* @param queue the queue to decorate, must not be null * @param queue the queue to decorate, must not be null
* @param predicate the predicate to use for validation, must not be null * @param predicate the predicate to use for validation, must not be null
* @throws IllegalArgumentException if Queue or predicate is null * @throws IllegalArgumentException if Queue or predicate is null
@ -76,7 +76,7 @@ public class PredicatedQueue<E> extends PredicatedCollection<E> implements Queue
/** /**
* Gets the queue being decorated. * Gets the queue being decorated.
* *
* @return the decorated queue * @return the decorated queue
*/ */
@Override @Override
@ -85,11 +85,11 @@ public class PredicatedQueue<E> extends PredicatedCollection<E> implements Queue
} }
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* Override to validate the object being added to ensure it matches * Override to validate the object being added to ensure it matches
* the predicate. * the predicate.
* *
* @param object the object being added * @param object the object being added
* @return the result of adding to the underlying queue * @return the result of adding to the underlying queue
* @throws IllegalArgumentException if the add is invalid * @throws IllegalArgumentException if the add is invalid

View File

@ -43,7 +43,7 @@ public class TransformedQueue<E> extends TransformedCollection<E> implements Que
* If there are any elements already in the queue being decorated, they * If there are any elements already in the queue being decorated, they
* are NOT transformed. * are NOT transformed.
* Contrast this with {@link #transformedQueue(Queue, Transformer)}. * Contrast this with {@link #transformedQueue(Queue, Transformer)}.
* *
* @param <E> the type of the elements in the queue * @param <E> the type of the elements in the queue
* @param queue the queue to decorate, must not be null * @param queue the queue to decorate, must not be null
* @param transformer the transformer to use for conversion, must not be null * @param transformer the transformer to use for conversion, must not be null
@ -54,7 +54,7 @@ public class TransformedQueue<E> extends TransformedCollection<E> implements Que
final Transformer<? super E, ? extends E> transformer) { final Transformer<? super E, ? extends E> transformer) {
return new TransformedQueue<E>(queue, transformer); return new TransformedQueue<E>(queue, transformer);
} }
/** /**
* Factory method to create a transforming queue that will transform * Factory method to create a transforming queue that will transform
* existing contents of the specified queue. * existing contents of the specified queue.
@ -62,7 +62,7 @@ public class TransformedQueue<E> extends TransformedCollection<E> implements Que
* If there are any elements already in the queue being decorated, they * If there are any elements already in the queue being decorated, they
* will be transformed by this method. * will be transformed by this method.
* Contrast this with {@link #transformingQueue(Queue, Transformer)}. * Contrast this with {@link #transformingQueue(Queue, Transformer)}.
* *
* @param <E> the type of the elements in the queue * @param <E> the type of the elements in the queue
* @param queue the queue to decorate, must not be null * @param queue the queue to decorate, must not be null
* @param transformer the transformer to use for conversion, must not be null * @param transformer the transformer to use for conversion, must not be null
@ -73,7 +73,7 @@ public class TransformedQueue<E> extends TransformedCollection<E> implements Que
public static <E> TransformedQueue<E> transformedQueue(final Queue<E> queue, public static <E> TransformedQueue<E> transformedQueue(final Queue<E> queue,
final Transformer<? super E, ? extends E> transformer) { final Transformer<? super E, ? extends E> transformer) {
// throws IAE if queue or transformer is null // throws IAE if queue or transformer is null
final TransformedQueue<E> decorated = new TransformedQueue<E>(queue, transformer); final TransformedQueue<E> decorated = new TransformedQueue<E>(queue, transformer);
if (queue.size() > 0) { if (queue.size() > 0) {
@SuppressWarnings("unchecked") // queue is type <E> @SuppressWarnings("unchecked") // queue is type <E>
final E[] values = (E[]) queue.toArray(); // NOPMD - false positive for generics final E[] values = (E[]) queue.toArray(); // NOPMD - false positive for generics
@ -91,7 +91,7 @@ public class TransformedQueue<E> extends TransformedCollection<E> implements Que
* <p> * <p>
* If there are any elements already in the queue being decorated, they * If there are any elements already in the queue being decorated, they
* are NOT transformed. * are NOT transformed.
* *
* @param queue the queue to decorate, must not be null * @param queue the queue to decorate, must not be null
* @param transformer the transformer to use for conversion, must not be null * @param transformer the transformer to use for conversion, must not be null
* @throws IllegalArgumentException if queue or transformer is null * @throws IllegalArgumentException if queue or transformer is null
@ -102,7 +102,7 @@ public class TransformedQueue<E> extends TransformedCollection<E> implements Que
/** /**
* Gets the decorated queue. * Gets the decorated queue.
* *
* @return the decorated queue * @return the decorated queue
*/ */
protected Queue<E> getQueue() { protected Queue<E> getQueue() {
@ -126,7 +126,7 @@ public class TransformedQueue<E> extends TransformedCollection<E> implements Que
public E element() { public E element() {
return getQueue().element(); return getQueue().element();
} }
public E remove() { public E remove() {
return getQueue().remove(); return getQueue().remove();
} }

View File

@ -30,7 +30,7 @@ import org.apache.commons.collections4.iterators.UnmodifiableIterator;
/** /**
* Decorates another {@link Queue} to ensure it can't be altered. * Decorates another {@link Queue} to ensure it can't be altered.
* <p> * <p>
* Attempts to modify it will result in an UnsupportedOperationException. * Attempts to modify it will result in an UnsupportedOperationException.
* *
* @since 4.0 * @since 4.0
* @version $Id$ * @version $Id$
@ -46,7 +46,7 @@ public final class UnmodifiableQueue<E>
* Factory method to create an unmodifiable queue. * Factory method to create an unmodifiable queue.
* <p> * <p>
* If the queue passed in is already unmodifiable, it is returned. * If the queue passed in is already unmodifiable, it is returned.
* *
* @param <E> the type of the elements in the queue * @param <E> the type of the elements in the queue
* @param queue the queue to decorate, must not be null * @param queue the queue to decorate, must not be null
* @return an unmodifiable Queue * @return an unmodifiable Queue
@ -62,7 +62,7 @@ public final class UnmodifiableQueue<E>
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* Constructor that wraps (not copies). * Constructor that wraps (not copies).
* *
* @param queue the queue to decorate, must not be null * @param queue the queue to decorate, must not be null
* @throws IllegalArgumentException if queue is null * @throws IllegalArgumentException if queue is null
*/ */
@ -73,7 +73,7 @@ public final class UnmodifiableQueue<E>
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* Write the collection out using a custom routine. * Write the collection out using a custom routine.
* *
* @param out the output stream * @param out the output stream
* @throws IOException if an I/O error occurs while writing to the output stream * @throws IOException if an I/O error occurs while writing to the output stream
*/ */
@ -84,7 +84,7 @@ public final class UnmodifiableQueue<E>
/** /**
* Read the collection in using a custom routine. * Read the collection in using a custom routine.
* *
* @param in the input stream * @param in the input stream
* @throws IOException if an I/O error occurs while reading from the input stream * @throws IOException if an I/O error occurs while reading from the input stream
* @throws ClassNotFoundException if the class of a serialized object can not be found * @throws ClassNotFoundException if the class of a serialized object can not be found
@ -132,7 +132,7 @@ public final class UnmodifiableQueue<E>
} }
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
@Override @Override
public boolean offer(final E obj) { public boolean offer(final E obj) {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
@ -142,10 +142,10 @@ public final class UnmodifiableQueue<E>
public E poll() { public E poll() {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
@Override @Override
public E remove() { public E remove() {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
} }

View File

@ -28,7 +28,7 @@
* <li>Transformed - transforms elements added to the queue * <li>Transformed - transforms elements added to the queue
* <li>Unmodifiable - ensures the collection cannot be altered * <li>Unmodifiable - ensures the collection cannot be altered
* </ul> * </ul>
* *
* @version $Id$ * @version $Id$
*/ */
package org.apache.commons.collections4.queue; package org.apache.commons.collections4.queue;