Make decorator classes serializable, bug 18815

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@131769 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Stephen Colebourne 2004-06-03 22:02:13 +00:00
parent e43b667815
commit 457467bbc4
31 changed files with 125 additions and 34 deletions

View File

@ -35,7 +35,7 @@ import org.apache.commons.collections.collection.PredicatedCollection;
* This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision: 1.7 $ $Date: 2004/06/02 21:56:19 $
* @version $Revision: 1.8 $ $Date: 2004/06/03 22:02:12 $
*
* @author Stephen Colebourne
* @author Paul Jack
@ -43,6 +43,9 @@ import org.apache.commons.collections.collection.PredicatedCollection;
public class PredicatedBag
extends PredicatedCollection implements Bag {
/** Serialization version */
private static final long serialVersionUID = -2575833140344736876L;
/**
* Factory method to create a predicated (validating) bag.
* <p>

View File

@ -34,7 +34,7 @@ import org.apache.commons.collections.SortedBag;
* This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision: 1.7 $ $Date: 2004/06/02 21:56:19 $
* @version $Revision: 1.8 $ $Date: 2004/06/03 22:02:12 $
*
* @author Stephen Colebourne
* @author Paul Jack
@ -42,6 +42,9 @@ import org.apache.commons.collections.SortedBag;
public class PredicatedSortedBag
extends PredicatedBag implements SortedBag {
/** Serialization version */
private static final long serialVersionUID = 3448581314086406616L;
/**
* Factory method to create a predicated (validating) bag.
* <p>

View File

@ -31,13 +31,16 @@ import org.apache.commons.collections.set.SynchronizedSet;
* This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision: 1.7 $ $Date: 2004/06/01 23:05:48 $
* @version $Revision: 1.8 $ $Date: 2004/06/03 22:02:12 $
*
* @author Stephen Colebourne
*/
public class SynchronizedBag
extends SynchronizedCollection implements Bag {
/** Serialization version */
private static final long serialVersionUID = 8084674570753837109L;
/**
* Factory method to create a synchronized bag.
*

View File

@ -30,13 +30,16 @@ import org.apache.commons.collections.SortedBag;
* This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision: 1.7 $ $Date: 2004/06/01 23:05:48 $
* @version $Revision: 1.8 $ $Date: 2004/06/03 22:02:12 $
*
* @author Stephen Colebourne
*/
public class SynchronizedSortedBag
extends SynchronizedBag implements SortedBag {
/** Serialization version */
private static final long serialVersionUID = 722374056718497858L;
/**
* Factory method to create a synchronized sorted bag.
*

View File

@ -33,13 +33,16 @@ import org.apache.commons.collections.set.TransformedSet;
* This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision: 1.6 $ $Date: 2004/06/02 21:56:19 $
* @version $Revision: 1.7 $ $Date: 2004/06/03 22:02:12 $
*
* @author Stephen Colebourne
*/
public class TransformedBag
extends TransformedCollection implements Bag {
/** Serialization version */
private static final long serialVersionUID = 5421170911299074185L;
/**
* Factory method to create a transforming bag.
* <p>

View File

@ -31,13 +31,16 @@ import org.apache.commons.collections.Transformer;
* This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision: 1.6 $ $Date: 2004/06/02 21:56:19 $
* @version $Revision: 1.7 $ $Date: 2004/06/03 22:02:12 $
*
* @author Stephen Colebourne
*/
public class TransformedSortedBag
extends TransformedBag implements SortedBag {
/** Serialization version */
private static final long serialVersionUID = -251737742649401930L;
/**
* Factory method to create a transforming sorted bag.
* <p>

View File

@ -37,7 +37,7 @@ import org.apache.commons.collections.BufferUnderflowException;
* This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision: 1.6 $ $Date: 2004/06/01 23:05:49 $
* @version $Revision: 1.7 $ $Date: 2004/06/03 22:02:13 $
*
* @author Stephen Colebourne
* @author Janek Bogucki
@ -45,6 +45,9 @@ import org.apache.commons.collections.BufferUnderflowException;
*/
public class BlockingBuffer extends SynchronizedBuffer {
/** Serialization version */
private static final long serialVersionUID = 1719328905017860541L;
/**
* Factory method to create a blocking buffer.
*

View File

@ -40,13 +40,16 @@ import java.util.Collection;
* This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision: 1.4 $ $Date: 2004/06/02 23:12:44 $
* @version $Revision: 1.5 $ $Date: 2004/06/03 22:02:13 $
*
* @author Stefano Fornari
* @author Stephen Colebourne
*/
public class CircularFifoBuffer extends BoundedFifoBuffer {
/** Serialization version */
private static final long serialVersionUID = -8423413834657610406L;
/**
* Constructor that creates a buffer with the default size of 32.
*/

View File

@ -33,13 +33,16 @@ import org.apache.commons.collections.collection.PredicatedCollection;
* This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision: 1.6 $ $Date: 2004/06/02 21:57:03 $
* @version $Revision: 1.7 $ $Date: 2004/06/03 22:02:13 $
*
* @author Stephen Colebourne
* @author Paul Jack
*/
public class PredicatedBuffer extends PredicatedCollection implements Buffer {
/** Serialization version */
private static final long serialVersionUID = 2307609000539943581L;
/**
* Factory method to create a predicated (validating) buffer.
* <p>

View File

@ -27,12 +27,15 @@ import org.apache.commons.collections.collection.SynchronizedCollection;
* This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision: 1.5 $ $Date: 2004/06/01 23:05:49 $
* @version $Revision: 1.6 $ $Date: 2004/06/03 22:02:13 $
*
* @author Stephen Colebourne
*/
public class SynchronizedBuffer extends SynchronizedCollection implements Buffer {
/** Serialization version */
private static final long serialVersionUID = -6859936183953626253L;
/**
* Factory method to create a synchronized buffer.
*

View File

@ -30,12 +30,15 @@ import org.apache.commons.collections.collection.TransformedCollection;
* This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision: 1.5 $ $Date: 2004/06/02 21:57:03 $
* @version $Revision: 1.6 $ $Date: 2004/06/03 22:02:13 $
*
* @author Stephen Colebourne
*/
public class TransformedBuffer extends TransformedCollection implements Buffer {
/** Serialization version */
private static final long serialVersionUID = -7901091318986132033L;
/**
* Factory method to create a transforming buffer.
* <p>

View File

@ -34,13 +34,16 @@ import org.apache.commons.collections.Predicate;
* This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision: 1.6 $ $Date: 2004/06/02 21:58:06 $
* @version $Revision: 1.7 $ $Date: 2004/06/03 22:02:13 $
*
* @author Stephen Colebourne
* @author Paul Jack
*/
public class PredicatedCollection extends AbstractSerializableCollectionDecorator {
/** Serialization version */
private static final long serialVersionUID = -5259182142076705162L;
/** The predicate to use */
protected final Predicate predicate;

View File

@ -34,7 +34,7 @@ import java.util.Iterator;
* This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision: 1.6 $ $Date: 2004/06/01 23:05:49 $
* @version $Revision: 1.7 $ $Date: 2004/06/03 22:02:13 $
*
* @author Stephen Colebourne
*/
@ -42,6 +42,7 @@ public class SynchronizedCollection implements Collection, Serializable {
/** Serialization version */
private static final long serialVersionUID = 2412805092710877986L;
/** The collection to decorate */
protected final Collection collection;
/** The object to lock on, needed for List/SortedSet views */

View File

@ -33,12 +33,15 @@ import org.apache.commons.collections.Transformer;
* This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision: 1.6 $ $Date: 2004/06/02 21:58:06 $
* @version $Revision: 1.7 $ $Date: 2004/06/03 22:02:13 $
*
* @author Stephen Colebourne
*/
public class TransformedCollection extends AbstractSerializableCollectionDecorator {
/** Serialization version */
private static final long serialVersionUID = 8692300188161871514L;
/** The transformer to use */
protected final Transformer transformer;

View File

@ -34,7 +34,7 @@ import org.apache.commons.collections.iterators.UnmodifiableIterator;
* This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision: 1.9 $ $Date: 2004/06/02 21:58:06 $
* @version $Revision: 1.10 $ $Date: 2004/06/03 22:02:13 $
*
* @author Stephen Colebourne
*/
@ -42,6 +42,9 @@ public final class UnmodifiableBoundedCollection
extends AbstractSerializableCollectionDecorator
implements BoundedCollection {
/** Serialization version */
private static final long serialVersionUID = -7112672385450340330L;
/**
* Factory method to create an unmodifiable bounded collection.
*

View File

@ -27,7 +27,7 @@ import org.apache.commons.collections.iterators.UnmodifiableIterator;
* This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision: 1.7 $ $Date: 2004/06/02 21:58:06 $
* @version $Revision: 1.8 $ $Date: 2004/06/03 22:02:13 $
*
* @author Stephen Colebourne
*/
@ -35,6 +35,9 @@ public final class UnmodifiableCollection
extends AbstractSerializableCollectionDecorator
implements Unmodifiable {
/** Serialization version */
private static final long serialVersionUID = -239892006883819945L;
/**
* Factory method to create an unmodifiable collection.
* <p>

View File

@ -33,7 +33,7 @@ import org.apache.commons.collections.iterators.UnmodifiableIterator;
* This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision: 1.7 $ $Date: 2004/06/02 21:59:49 $
* @version $Revision: 1.8 $ $Date: 2004/06/03 22:02:13 $
*
* @author Stephen Colebourne
* @author Paul Jack
@ -42,6 +42,9 @@ public class FixedSizeList
extends AbstractSerializableListDecorator
implements BoundedCollection {
/** Serialization version */
private static final long serialVersionUID = -2218010673611160319L;
/**
* Factory method to create a fixed size list.
*

View File

@ -49,7 +49,7 @@ import org.apache.commons.collections.Factory;
* This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision: 1.5 $ $Date: 2004/06/02 21:59:49 $
* @version $Revision: 1.6 $ $Date: 2004/06/03 22:02:13 $
*
* @author Stephen Colebourne
* @author Arron Bates
@ -57,6 +57,9 @@ import org.apache.commons.collections.Factory;
*/
public class LazyList extends AbstractSerializableListDecorator {
/** Serialization version */
private static final long serialVersionUID = -1708388017160694542L;
/** The factory to use to lazily instantiate the objects */
protected final Factory factory;

View File

@ -38,13 +38,16 @@ import org.apache.commons.collections.iterators.AbstractListIteratorDecorator;
* This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision: 1.5 $ $Date: 2004/06/02 21:59:49 $
* @version $Revision: 1.6 $ $Date: 2004/06/03 22:02:13 $
*
* @author Stephen Colebourne
* @author Paul Jack
*/
public class PredicatedList extends PredicatedCollection implements List {
/** Serialization version */
private static final long serialVersionUID = -5722039223898659102L;
/**
* Factory method to create a predicated (validating) list.
* <p>

View File

@ -43,13 +43,16 @@ import org.apache.commons.collections.set.UnmodifiableSet;
* This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision: 1.7 $ $Date: 2004/06/02 21:59:49 $
* @version $Revision: 1.8 $ $Date: 2004/06/03 22:02:13 $
*
* @author Matthew Hawthorne
* @author Stephen Colebourne
*/
public class SetUniqueList extends AbstractSerializableListDecorator {
/** Serialization version */
private static final long serialVersionUID = 7196982186153478694L;
/**
* Internal Set to maintain uniqueness.
*/

View File

@ -30,12 +30,15 @@ import org.apache.commons.collections.collection.SynchronizedCollection;
* This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision: 1.4 $ $Date: 2004/06/01 23:05:49 $
* @version $Revision: 1.5 $ $Date: 2004/06/03 22:02:13 $
*
* @author Stephen Colebourne
*/
public class SynchronizedList extends SynchronizedCollection implements List {
/** Serialization version */
private static final long serialVersionUID = -1403835447328619437L;
/**
* Factory method to create a synchronized list.
*

View File

@ -34,12 +34,15 @@ import org.apache.commons.collections.iterators.AbstractListIteratorDecorator;
* This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision: 1.4 $ $Date: 2004/06/02 21:59:49 $
* @version $Revision: 1.5 $ $Date: 2004/06/03 22:02:13 $
*
* @author Stephen Colebourne
*/
public class TransformedList extends TransformedCollection implements List {
/** Serialization version */
private static final long serialVersionUID = 1077193035000013141L;
/**
* Factory method to create a transforming list.
* <p>

View File

@ -30,7 +30,7 @@ import org.apache.commons.collections.iterators.UnmodifiableListIterator;
* This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision: 1.6 $ $Date: 2004/06/02 21:59:49 $
* @version $Revision: 1.7 $ $Date: 2004/06/03 22:02:13 $
*
* @author Stephen Colebourne
*/
@ -38,6 +38,9 @@ public final class UnmodifiableList
extends AbstractSerializableListDecorator
implements Unmodifiable {
/** Serialization version */
private static final long serialVersionUID = 6595182819922443652L;
/**
* Factory method to create an unmodifiable list.
*

View File

@ -44,13 +44,16 @@ import org.apache.commons.collections.list.UnmodifiableList;
* This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision: 1.7 $ $Date: 2004/06/02 22:02:34 $
* @version $Revision: 1.8 $ $Date: 2004/06/03 22:02:13 $
*
* @author Stephen Colebourne
* @author Henning P. Schmiedehausen
*/
public class ListOrderedSet extends AbstractSerializableSetDecorator implements Set {
/** Serialization version */
private static final long serialVersionUID = -228664372470420141L;
/** Internal list to hold the sequence of objects */
protected final List setOrder;

View File

@ -34,13 +34,16 @@ import org.apache.commons.collections.collection.PredicatedCollection;
* This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision: 1.5 $ $Date: 2004/06/02 22:02:34 $
* @version $Revision: 1.6 $ $Date: 2004/06/03 22:02:13 $
*
* @author Stephen Colebourne
* @author Paul Jack
*/
public class PredicatedSet extends PredicatedCollection implements Set {
/** Serialization version */
private static final long serialVersionUID = -684521469108685117L;
/**
* Factory method to create a predicated (validating) set.
* <p>

View File

@ -34,13 +34,16 @@ import org.apache.commons.collections.Predicate;
* This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision: 1.5 $ $Date: 2004/06/02 22:02:34 $
* @version $Revision: 1.6 $ $Date: 2004/06/03 22:02:13 $
*
* @author Stephen Colebourne
* @author Paul Jack
*/
public class PredicatedSortedSet extends PredicatedSet implements SortedSet {
/** Serialization version */
private static final long serialVersionUID = -9110948148132275052L;
/**
* Factory method to create a predicated (validating) sorted set.
* <p>

View File

@ -28,12 +28,15 @@ import org.apache.commons.collections.collection.SynchronizedCollection;
* This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision: 1.4 $ $Date: 2004/06/01 23:05:49 $
* @version $Revision: 1.5 $ $Date: 2004/06/03 22:02:13 $
*
* @author Stephen Colebourne
*/
public class SynchronizedSet extends SynchronizedCollection implements Set {
/** Serialization version */
private static final long serialVersionUID = -8304417378626543635L;
/**
* Factory method to create a synchronized set.
*

View File

@ -29,12 +29,15 @@ import org.apache.commons.collections.collection.SynchronizedCollection;
* This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision: 1.4 $ $Date: 2004/06/01 23:05:49 $
* @version $Revision: 1.5 $ $Date: 2004/06/03 22:02:13 $
*
* @author Stephen Colebourne
*/
public class SynchronizedSortedSet extends SynchronizedCollection implements SortedSet {
/** Serialization version */
private static final long serialVersionUID = 2775582861954500111L;
/**
* Factory method to create a synchronized set.
*

View File

@ -31,12 +31,15 @@ import org.apache.commons.collections.collection.TransformedCollection;
* This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision: 1.4 $ $Date: 2004/06/02 22:02:34 $
* @version $Revision: 1.5 $ $Date: 2004/06/03 22:02:13 $
*
* @author Stephen Colebourne
*/
public class TransformedSet extends TransformedCollection implements Set {
/** Serialization version */
private static final long serialVersionUID = 306127383500410386L;
/**
* Factory method to create a transforming set.
* <p>

View File

@ -31,12 +31,15 @@ import org.apache.commons.collections.Transformer;
* This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision: 1.4 $ $Date: 2004/06/02 22:02:34 $
* @version $Revision: 1.5 $ $Date: 2004/06/03 22:02:13 $
*
* @author Stephen Colebourne
*/
public class TransformedSortedSet extends TransformedSet implements SortedSet {
/** Serialization version */
private static final long serialVersionUID = -1675486811351124386L;
/**
* Factory method to create a transforming sorted set.
* <p>

View File

@ -28,7 +28,7 @@ import org.apache.commons.collections.iterators.UnmodifiableIterator;
* This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision: 1.6 $ $Date: 2004/06/02 22:02:34 $
* @version $Revision: 1.7 $ $Date: 2004/06/03 22:02:13 $
*
* @author Stephen Colebourne
*/
@ -36,6 +36,9 @@ public final class UnmodifiableSet
extends AbstractSerializableSetDecorator
implements Unmodifiable {
/** Serialization version */
private static final long serialVersionUID = 6499119872185240161L;
/**
* Factory method to create an unmodifiable set.
*