You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by sc...@apache.org on 2004/01/05 23:15:15 UTC
cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections/map TypedSortedMap.java TransformedMap.java AbstractOrderedMapDecorator.java TransformedSortedMap.java AbstractMapDecorator.java TypedMap.java AbstractSortedMapDecorator.java StaticBucketMap.java UnmodifiableEntrySet.java ReferenceMap.java UnmodifiableMap.java UnmodifiableOrderedMap.java PredicatedSortedMap.java PredicatedMap.java UnmodifiableSortedMap.java
scolebourne 2004/01/05 14:15:15
Modified: collections/src/java/org/apache/commons/collections/map
TypedSortedMap.java TransformedMap.java
AbstractOrderedMapDecorator.java
TransformedSortedMap.java AbstractMapDecorator.java
TypedMap.java AbstractSortedMapDecorator.java
StaticBucketMap.java UnmodifiableEntrySet.java
ReferenceMap.java UnmodifiableMap.java
UnmodifiableOrderedMap.java
PredicatedSortedMap.java PredicatedMap.java
UnmodifiableSortedMap.java
Log:
Update file layout for consistency
Revision Changes Path
1.2 +4 -4 jakarta-commons/collections/src/java/org/apache/commons/collections/map/TypedSortedMap.java
Index: TypedSortedMap.java
===================================================================
RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/map/TypedSortedMap.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TypedSortedMap.java 16 Nov 2003 00:05:45 -0000 1.1
+++ TypedSortedMap.java 5 Jan 2004 22:15:14 -0000 1.2
@@ -4,7 +4,7 @@
*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2003 The Apache Software Foundation. All rights
+ * Copyright (c) 2003-2004 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -96,7 +96,7 @@
PredicateUtils.instanceofPredicate(valueType)
);
}
-
+
/**
* Restrictive constructor.
*/
1.4 +4 -4 jakarta-commons/collections/src/java/org/apache/commons/collections/map/TransformedMap.java
Index: TransformedMap.java
===================================================================
RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/map/TransformedMap.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- TransformedMap.java 25 Dec 2003 00:49:14 -0000 1.3
+++ TransformedMap.java 5 Jan 2004 22:15:14 -0000 1.4
@@ -4,7 +4,7 @@
*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2003 The Apache Software Foundation. All rights
+ * Copyright (c) 2003-2004 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -102,7 +102,7 @@
public static Map decorate(Map map, Transformer keyTransformer, Transformer valueTransformer) {
return new TransformedMap(map, keyTransformer, valueTransformer);
}
-
+
//-----------------------------------------------------------------------
/**
* Constructor that wraps (not copies).
1.4 +6 -5 jakarta-commons/collections/src/java/org/apache/commons/collections/map/AbstractOrderedMapDecorator.java
Index: AbstractOrderedMapDecorator.java
===================================================================
RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/map/AbstractOrderedMapDecorator.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- AbstractOrderedMapDecorator.java 1 Dec 2003 22:48:59 -0000 1.3
+++ AbstractOrderedMapDecorator.java 5 Jan 2004 22:15:14 -0000 1.4
@@ -4,7 +4,7 @@
*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2003 The Apache Software Foundation. All rights
+ * Copyright (c) 2003-2004 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -78,8 +78,9 @@
*
* @author Stephen Colebourne
*/
-public abstract class AbstractOrderedMapDecorator extends AbstractMapDecorator implements OrderedMap {
-
+public abstract class AbstractOrderedMapDecorator
+ extends AbstractMapDecorator implements OrderedMap {
+
/**
* Constructor that wraps (not copies).
*
1.2 +5 -4 jakarta-commons/collections/src/java/org/apache/commons/collections/map/TransformedSortedMap.java
Index: TransformedSortedMap.java
===================================================================
RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/map/TransformedSortedMap.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TransformedSortedMap.java 16 Nov 2003 00:05:45 -0000 1.1
+++ TransformedSortedMap.java 5 Jan 2004 22:15:14 -0000 1.2
@@ -4,7 +4,7 @@
*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2003 The Apache Software Foundation. All rights
+ * Copyright (c) 2003-2004 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -75,7 +75,8 @@
*
* @author Stephen Colebourne
*/
-public class TransformedSortedMap extends TransformedMap implements SortedMap {
+public class TransformedSortedMap
+ extends TransformedMap implements SortedMap {
/**
* Factory method to create a transforming sorted map.
1.2 +4 -4 jakarta-commons/collections/src/java/org/apache/commons/collections/map/AbstractMapDecorator.java
Index: AbstractMapDecorator.java
===================================================================
RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/map/AbstractMapDecorator.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AbstractMapDecorator.java 16 Nov 2003 00:05:45 -0000 1.1
+++ AbstractMapDecorator.java 5 Jan 2004 22:15:14 -0000 1.2
@@ -4,7 +4,7 @@
*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2003 The Apache Software Foundation. All rights
+ * Copyright (c) 2003-2004 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -81,7 +81,7 @@
* @author Stephen Colebourne
*/
public abstract class AbstractMapDecorator implements Map {
-
+
/** The map to decorate */
protected final Map map;
1.2 +4 -4 jakarta-commons/collections/src/java/org/apache/commons/collections/map/TypedMap.java
Index: TypedMap.java
===================================================================
RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/map/TypedMap.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TypedMap.java 16 Nov 2003 00:05:45 -0000 1.1
+++ TypedMap.java 5 Jan 2004 22:15:14 -0000 1.2
@@ -4,7 +4,7 @@
*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2003 The Apache Software Foundation. All rights
+ * Copyright (c) 2003-2004 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -96,7 +96,7 @@
PredicateUtils.instanceofPredicate(valueType)
);
}
-
+
/**
* Restrictive constructor.
*/
1.2 +6 -5 jakarta-commons/collections/src/java/org/apache/commons/collections/map/AbstractSortedMapDecorator.java
Index: AbstractSortedMapDecorator.java
===================================================================
RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/map/AbstractSortedMapDecorator.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AbstractSortedMapDecorator.java 16 Nov 2003 00:05:45 -0000 1.1
+++ AbstractSortedMapDecorator.java 5 Jan 2004 22:15:14 -0000 1.2
@@ -4,7 +4,7 @@
*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2003 The Apache Software Foundation. All rights
+ * Copyright (c) 2003-2004 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -77,8 +77,9 @@
*
* @author Stephen Colebourne
*/
-public abstract class AbstractSortedMapDecorator extends AbstractMapDecorator implements SortedMap {
-
+public abstract class AbstractSortedMapDecorator
+ extends AbstractMapDecorator implements SortedMap {
+
/**
* Constructor that wraps (not copies).
*
1.8 +6 -3 jakarta-commons/collections/src/java/org/apache/commons/collections/map/StaticBucketMap.java
Index: StaticBucketMap.java
===================================================================
RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/map/StaticBucketMap.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- StaticBucketMap.java 2 Jan 2004 02:13:07 -0000 1.7
+++ StaticBucketMap.java 5 Jan 2004 22:15:14 -0000 1.8
@@ -4,7 +4,7 @@
*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2002-2003 The Apache Software Foundation. All rights
+ * Copyright (c) 2002-2004 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -143,8 +143,11 @@
*/
public final class StaticBucketMap implements Map {
+ /** The default number of buckets to use */
private static final int DEFAULT_BUCKETS = 255;
+ /** The array of buckets, where the actual data is held */
private Node[] buckets;
+ /** The matching array of locks */
private Lock[] locks;
/**
1.4 +6 -5 jakarta-commons/collections/src/java/org/apache/commons/collections/map/UnmodifiableEntrySet.java
Index: UnmodifiableEntrySet.java
===================================================================
RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/map/UnmodifiableEntrySet.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- UnmodifiableEntrySet.java 29 Dec 2003 15:08:15 -0000 1.3
+++ UnmodifiableEntrySet.java 5 Jan 2004 22:15:14 -0000 1.4
@@ -4,7 +4,7 @@
*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2003 The Apache Software Foundation. All rights
+ * Copyright (c) 2003-2004 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -76,8 +76,9 @@
*
* @author Stephen Colebourne
*/
-public final class UnmodifiableEntrySet extends AbstractSetDecorator implements Unmodifiable {
-
+public final class UnmodifiableEntrySet
+ extends AbstractSetDecorator implements Unmodifiable {
+
/**
* Factory method to create an unmodifiable set of Map Entry objects.
*
1.7 +3 -19 jakarta-commons/collections/src/java/org/apache/commons/collections/map/ReferenceMap.java
Index: ReferenceMap.java
===================================================================
RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/map/ReferenceMap.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ReferenceMap.java 29 Dec 2003 15:08:15 -0000 1.6
+++ ReferenceMap.java 5 Jan 2004 22:15:14 -0000 1.7
@@ -4,7 +4,7 @@
*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001-2003 The Apache Software Foundation. All rights
+ * Copyright (c) 2002-2004 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -130,28 +130,23 @@
*/
private static final long serialVersionUID = -3370601314380922368L;
-
/**
* Constant indicating that hard references should be used.
*/
public static final int HARD = 0;
-
/**
* Constant indicating that soft references should be used.
*/
public static final int SOFT = 1;
-
/**
* Constant indicating that weak references should be used.
*/
public static final int WEAK = 2;
-
// --- serialized instance variables:
-
/**
* The reference type for keys. Must be HARD, SOFT, WEAK.
* Note: I originally marked this field as final, but then this class
@@ -160,7 +155,6 @@
*/
private int keyType;
-
/**
* The reference type for values. Must be HARD, SOFT, WEAK.
* Note: I originally marked this field as final, but then this class
@@ -169,7 +163,6 @@
*/
private int valueType;
-
/**
* The threshold variable is calculated by multiplying
* table.length and loadFactor.
@@ -184,7 +177,6 @@
*/
private boolean purgeValues = false;
-
// -- Non-serialized instance variables
/**
@@ -193,49 +185,41 @@
*/
private transient ReferenceQueue queue = new ReferenceQueue();
-
/**
* The hash table. Its length is always a power of two.
*/
private transient Entry[] table;
-
/**
* Number of mappings in this map.
*/
private transient int size;
-
/**
* When size reaches threshold, the map is resized.
* See resize().
*/
private transient int threshold;
-
/**
* Number of times this map has been modified.
*/
private transient volatile int modCount;
-
/**
* Cached key set. May be null if key set is never accessed.
*/
private transient Set keySet;
-
/**
* Cached entry set. May be null if entry set is never accessed.
*/
private transient Set entrySet;
-
/**
* Cached values. May be null if values() is never accessed.
*/
private transient Collection values;
-
/**
* Constructs a new <code>ReferenceMap</code> that will
1.7 +5 -4 jakarta-commons/collections/src/java/org/apache/commons/collections/map/UnmodifiableMap.java
Index: UnmodifiableMap.java
===================================================================
RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/map/UnmodifiableMap.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- UnmodifiableMap.java 3 Dec 2003 12:27:36 -0000 1.6
+++ UnmodifiableMap.java 5 Jan 2004 22:15:15 -0000 1.7
@@ -4,7 +4,7 @@
*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2003 The Apache Software Foundation. All rights
+ * Copyright (c) 2003-2004 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -77,7 +77,8 @@
*
* @author Stephen Colebourne
*/
-public final class UnmodifiableMap extends AbstractMapDecorator implements IterableMap, Unmodifiable {
+public final class UnmodifiableMap
+ extends AbstractMapDecorator implements IterableMap, Unmodifiable {
/**
* Factory method to create an unmodifiable map.
1.5 +5 -4 jakarta-commons/collections/src/java/org/apache/commons/collections/map/UnmodifiableOrderedMap.java
Index: UnmodifiableOrderedMap.java
===================================================================
RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/map/UnmodifiableOrderedMap.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- UnmodifiableOrderedMap.java 3 Dec 2003 12:27:36 -0000 1.4
+++ UnmodifiableOrderedMap.java 5 Jan 2004 22:15:15 -0000 1.5
@@ -4,7 +4,7 @@
*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2003 The Apache Software Foundation. All rights
+ * Copyright (c) 2003-2004 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -78,7 +78,8 @@
*
* @author Stephen Colebourne
*/
-public final class UnmodifiableOrderedMap extends AbstractOrderedMapDecorator implements Unmodifiable {
+public final class UnmodifiableOrderedMap
+ extends AbstractOrderedMapDecorator implements Unmodifiable {
/**
* Factory method to create an unmodifiable sorted map.
1.2 +5 -4 jakarta-commons/collections/src/java/org/apache/commons/collections/map/PredicatedSortedMap.java
Index: PredicatedSortedMap.java
===================================================================
RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/map/PredicatedSortedMap.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- PredicatedSortedMap.java 16 Nov 2003 00:05:45 -0000 1.1
+++ PredicatedSortedMap.java 5 Jan 2004 22:15:15 -0000 1.2
@@ -4,7 +4,7 @@
*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2003 The Apache Software Foundation. All rights
+ * Copyright (c) 2003-2004 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -75,7 +75,8 @@
* @author Stephen Colebourne
* @author Paul Jack
*/
-public class PredicatedSortedMap extends PredicatedMap implements SortedMap {
+public class PredicatedSortedMap
+ extends PredicatedMap implements SortedMap {
/**
* Factory method to create a predicated (validating) sorted map.
1.5 +4 -4 jakarta-commons/collections/src/java/org/apache/commons/collections/map/PredicatedMap.java
Index: PredicatedMap.java
===================================================================
RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/map/PredicatedMap.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- PredicatedMap.java 29 Dec 2003 15:08:15 -0000 1.4
+++ PredicatedMap.java 5 Jan 2004 22:15:15 -0000 1.5
@@ -4,7 +4,7 @@
*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2003 The Apache Software Foundation. All rights
+ * Copyright (c) 2003-2004 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -101,7 +101,7 @@
public static Map decorate(Map map, Predicate keyPredicate, Predicate valuePredicate) {
return new PredicatedMap(map, keyPredicate, valuePredicate);
}
-
+
//-----------------------------------------------------------------------
/**
* Constructor that wraps (not copies).
1.4 +5 -4 jakarta-commons/collections/src/java/org/apache/commons/collections/map/UnmodifiableSortedMap.java
Index: UnmodifiableSortedMap.java
===================================================================
RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/map/UnmodifiableSortedMap.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- UnmodifiableSortedMap.java 3 Dec 2003 12:27:36 -0000 1.3
+++ UnmodifiableSortedMap.java 5 Jan 2004 22:15:15 -0000 1.4
@@ -4,7 +4,7 @@
*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2003 The Apache Software Foundation. All rights
+ * Copyright (c) 2003-2004 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -75,7 +75,8 @@
*
* @author Stephen Colebourne
*/
-public final class UnmodifiableSortedMap extends AbstractSortedMapDecorator implements Unmodifiable {
+public final class UnmodifiableSortedMap
+ extends AbstractSortedMapDecorator implements Unmodifiable {
/**
* Factory method to create an unmodifiable sorted map.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org