mirror of
https://github.com/apache/commons-collections.git
synced 2025-02-06 01:59:08 +00:00
Remove trailing spaces.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1477746 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
75e7e31108
commit
3b9d20636a
@ -31,7 +31,7 @@ import java.util.Iterator;
|
||||
* written for each implementation.
|
||||
* <p>
|
||||
* This implementation does not perform any special processing with
|
||||
* {@link #iterator()}. Instead it simply returns the value from the
|
||||
* {@link #iterator()}. Instead it simply returns the value from the
|
||||
* wrapped collection. This may be undesirable, for example if you are trying
|
||||
* to write an unmodifiable implementation it might provide a loophole.
|
||||
*
|
||||
@ -60,7 +60,7 @@ public abstract class AbstractCollectionDecorator<E>
|
||||
|
||||
/**
|
||||
* Constructor that wraps (not copies).
|
||||
*
|
||||
*
|
||||
* @param coll the collection to decorate, must not be null
|
||||
* @throws IllegalArgumentException if the collection is null
|
||||
*/
|
||||
@ -74,7 +74,7 @@ public abstract class AbstractCollectionDecorator<E>
|
||||
/**
|
||||
* Gets the collection being decorated.
|
||||
* All access to the decorated collection goes via this method.
|
||||
*
|
||||
*
|
||||
* @return the decorated collection
|
||||
*/
|
||||
protected Collection<E> decorated() {
|
||||
@ -82,7 +82,7 @@ public abstract class AbstractCollectionDecorator<E>
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
|
||||
public boolean add(final E object) {
|
||||
return decorated().add(object);
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ import org.apache.commons.collections4.map.MultiValueMap;
|
||||
*
|
||||
* @param <K> the type of object in the index.
|
||||
* @param <C> the type of object in the collection.
|
||||
*
|
||||
*
|
||||
* @since 4.0
|
||||
* @version $Id$
|
||||
*/
|
||||
@ -51,7 +51,7 @@ public class IndexedCollection<K, C> extends AbstractCollectionDecorator<C> {
|
||||
|
||||
/** The map of indexes to collected objects. */
|
||||
private final MultiMap<K, C> index;
|
||||
|
||||
|
||||
/** The uniqueness constraint for the index. */
|
||||
private final boolean uniqueIndex;
|
||||
|
||||
|
@ -50,7 +50,7 @@ public class PredicatedCollection<E> extends AbstractCollectionDecorator<E> {
|
||||
* <p>
|
||||
* If there are any elements already in the collection being decorated, they
|
||||
* are validated.
|
||||
*
|
||||
*
|
||||
* @param <T> the type of the elements in the collection
|
||||
* @param coll the collection to decorate, must not be null
|
||||
* @param predicate the predicate to use for validation, must not be null
|
||||
@ -69,7 +69,7 @@ public class PredicatedCollection<E> extends AbstractCollectionDecorator<E> {
|
||||
* <p>
|
||||
* If there are any elements already in the collection being decorated, they
|
||||
* are validated.
|
||||
*
|
||||
*
|
||||
* @param coll the collection to decorate, must not be null
|
||||
* @param predicate the predicate to use for validation, must not be null
|
||||
* @throws IllegalArgumentException if collection or predicate is null
|
||||
@ -91,7 +91,7 @@ public class PredicatedCollection<E> extends AbstractCollectionDecorator<E> {
|
||||
* <p>
|
||||
* The predicate itself should not throw an exception, but return false to
|
||||
* indicate that the object cannot be added.
|
||||
*
|
||||
*
|
||||
* @param object the object being added
|
||||
* @throws IllegalArgumentException if the add is invalid
|
||||
*/
|
||||
@ -106,7 +106,7 @@ public class PredicatedCollection<E> extends AbstractCollectionDecorator<E> {
|
||||
/**
|
||||
* Override to validate the object being added to ensure it matches
|
||||
* the predicate.
|
||||
*
|
||||
*
|
||||
* @param object the object being added
|
||||
* @return the result of adding to the underlying collection
|
||||
* @throws IllegalArgumentException if the add is invalid
|
||||
@ -121,7 +121,7 @@ public class PredicatedCollection<E> extends AbstractCollectionDecorator<E> {
|
||||
* Override to validate the objects being added to ensure they match
|
||||
* the predicate. If any one fails, no update is made to the underlying
|
||||
* collection.
|
||||
*
|
||||
*
|
||||
* @param coll the collection being added
|
||||
* @return the result of adding to the underlying collection
|
||||
* @throws IllegalArgumentException if the add is invalid
|
||||
|
@ -50,7 +50,7 @@ public class SynchronizedCollection<E> implements Collection<E>, Serializable {
|
||||
|
||||
/**
|
||||
* Factory method to create a synchronized collection.
|
||||
*
|
||||
*
|
||||
* @param <T> the type of the elements in the collection
|
||||
* @param coll the collection to decorate, must not be null
|
||||
* @return a new synchronized collection
|
||||
@ -63,7 +63,7 @@ public class SynchronizedCollection<E> implements Collection<E>, Serializable {
|
||||
//-----------------------------------------------------------------------
|
||||
/**
|
||||
* Constructor that wraps (not copies).
|
||||
*
|
||||
*
|
||||
* @param collection the collection to decorate, must not be null
|
||||
* @throws IllegalArgumentException if the collection is null
|
||||
*/
|
||||
@ -77,7 +77,7 @@ public class SynchronizedCollection<E> implements Collection<E>, Serializable {
|
||||
|
||||
/**
|
||||
* Constructor that wraps (not copies).
|
||||
*
|
||||
*
|
||||
* @param collection the collection to decorate, must not be null
|
||||
* @param lock the lock object to use, must not be null
|
||||
* @throws IllegalArgumentException if the collection is null
|
||||
@ -92,7 +92,7 @@ public class SynchronizedCollection<E> implements Collection<E>, Serializable {
|
||||
|
||||
/**
|
||||
* Gets the collection being decorated.
|
||||
*
|
||||
*
|
||||
* @return the decorated collection
|
||||
*/
|
||||
protected Collection<E> decorated() {
|
||||
@ -100,7 +100,7 @@ public class SynchronizedCollection<E> implements Collection<E>, Serializable {
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
|
||||
public boolean add(final E object) {
|
||||
synchronized (lock) {
|
||||
return decorated().add(object);
|
||||
@ -144,7 +144,8 @@ public class SynchronizedCollection<E> implements Collection<E>, Serializable {
|
||||
* Iterator it = coll.iterator();
|
||||
* // do stuff with iterator
|
||||
* }
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @return an iterator that must be manually synchronized on the collection
|
||||
*/
|
||||
public Iterator<E> iterator() {
|
||||
|
@ -50,7 +50,7 @@ public class TransformedCollection<E> extends AbstractCollectionDecorator<E> {
|
||||
* If there are any elements already in the collection being decorated, they
|
||||
* are NOT transformed.
|
||||
* Contrast this with {@link #transformedCollection(Collection, Transformer)}.
|
||||
*
|
||||
*
|
||||
* @param <E> the type of the elements in the collection
|
||||
* @param coll the collection to decorate, must not be null
|
||||
* @param transformer the transformer to use for conversion, must not be null
|
||||
@ -69,7 +69,7 @@ public class TransformedCollection<E> extends AbstractCollectionDecorator<E> {
|
||||
* If there are any elements already in the collection being decorated, they
|
||||
* will be transformed by this method.
|
||||
* Contrast this with {@link #transformingCollection(Collection, Transformer)}.
|
||||
*
|
||||
*
|
||||
* @param <E> the type of the elements in the collection
|
||||
* @param collection the collection to decorate, must not be null
|
||||
* @param transformer the transformer to use for conversion, must not be null
|
||||
@ -81,7 +81,7 @@ public class TransformedCollection<E> extends AbstractCollectionDecorator<E> {
|
||||
final Transformer<? super E, ? extends E> transformer) {
|
||||
|
||||
final TransformedCollection<E> decorated = new TransformedCollection<E>(collection, transformer);
|
||||
// null collection & transformer are disallowed by the constructor call above
|
||||
// null collection & transformer are disallowed by the constructor call above
|
||||
if (collection.size() > 0) {
|
||||
@SuppressWarnings("unchecked") // collection is of type E
|
||||
final E[] values = (E[]) collection.toArray(); // NOPMD - false positive for generics
|
||||
@ -99,7 +99,7 @@ public class TransformedCollection<E> extends AbstractCollectionDecorator<E> {
|
||||
* <p>
|
||||
* If there are any elements already in the collection being decorated, they
|
||||
* are NOT transformed.
|
||||
*
|
||||
*
|
||||
* @param coll the collection to decorate, must not be null
|
||||
* @param transformer the transformer to use for conversion, must not be null
|
||||
* @throws IllegalArgumentException if collection or transformer is null
|
||||
@ -116,7 +116,7 @@ public class TransformedCollection<E> extends AbstractCollectionDecorator<E> {
|
||||
* Transforms an object.
|
||||
* <p>
|
||||
* The transformer itself may throw an exception if necessary.
|
||||
*
|
||||
*
|
||||
* @param object the object to transform
|
||||
* @return a transformed object
|
||||
*/
|
||||
@ -128,7 +128,7 @@ public class TransformedCollection<E> extends AbstractCollectionDecorator<E> {
|
||||
* Transforms a collection.
|
||||
* <p>
|
||||
* The transformer itself may throw an exception if necessary.
|
||||
*
|
||||
*
|
||||
* @param coll the collection to transform
|
||||
* @return a transformed object
|
||||
*/
|
||||
|
@ -34,7 +34,7 @@ import org.apache.commons.collections4.iterators.UnmodifiableIterator;
|
||||
* <p>
|
||||
* This class is Serializable from Commons Collections 3.1.
|
||||
* <p>
|
||||
* Attempts to modify it will result in an UnsupportedOperationException.
|
||||
* Attempts to modify it will result in an UnsupportedOperationException.
|
||||
*
|
||||
* @since 3.0
|
||||
* @version $Id$
|
||||
|
@ -27,7 +27,7 @@ import org.apache.commons.collections4.iterators.UnmodifiableIterator;
|
||||
* <p>
|
||||
* This class is Serializable from Commons Collections 3.1.
|
||||
* <p>
|
||||
* Attempts to modify it will result in an UnsupportedOperationException.
|
||||
* Attempts to modify it will result in an UnsupportedOperationException.
|
||||
*
|
||||
* @param <E> the type of the elements in the collection
|
||||
* @since 3.0
|
||||
@ -44,7 +44,7 @@ public final class UnmodifiableCollection<E>
|
||||
* Factory method to create an unmodifiable collection.
|
||||
* <p>
|
||||
* If the collection passed in is already unmodifiable, it is returned.
|
||||
*
|
||||
*
|
||||
* @param <T> the type of the elements in the collection
|
||||
* @param coll the collection to decorate, must not be null
|
||||
* @return an unmodifiable collection
|
||||
@ -60,7 +60,7 @@ public final class UnmodifiableCollection<E>
|
||||
//-----------------------------------------------------------------------
|
||||
/**
|
||||
* Constructor that wraps (not copies).
|
||||
*
|
||||
*
|
||||
* @param coll the collection to decorate, must not be null
|
||||
* @throws IllegalArgumentException if collection is null
|
||||
*/
|
||||
|
@ -30,7 +30,7 @@
|
||||
* <li>Transformed - transforms elements as they are added
|
||||
* <li>Indexed - provides a map-like view onto another collection
|
||||
* </ul>
|
||||
*
|
||||
*
|
||||
* @version $Id$
|
||||
*/
|
||||
package org.apache.commons.collections4.collection;
|
||||
|
Loading…
x
Reference in New Issue
Block a user