[jboss-svn-commits] JBoss Common SVN: r2685 - common-core/trunk/src/main/java/org/jboss/util/collection.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Dec 17 17:44:09 EST 2007


Author: alesj
Date: 2007-12-17 17:44:09 -0500 (Mon, 17 Dec 2007)
New Revision: 2685

Modified:
   common-core/trunk/src/main/java/org/jboss/util/collection/LazyList.java
   common-core/trunk/src/main/java/org/jboss/util/collection/LazyMap.java
   common-core/trunk/src/main/java/org/jboss/util/collection/LazySet.java
   common-core/trunk/src/main/java/org/jboss/util/collection/WeakTypeCache.java
Log:
Serializable lazy collections.
Having type defining methods protected.

Modified: common-core/trunk/src/main/java/org/jboss/util/collection/LazyList.java
===================================================================
--- common-core/trunk/src/main/java/org/jboss/util/collection/LazyList.java	2007-11-23 13:34:50 UTC (rev 2684)
+++ common-core/trunk/src/main/java/org/jboss/util/collection/LazyList.java	2007-12-17 22:44:09 UTC (rev 2685)
@@ -27,15 +27,17 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.ListIterator;
+import java.io.Serializable;
 
 /**
  * LazyList.
+ * It's serializable if the elements are serializable.
  * 
  * @param <T> the collection type
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @version $Revision$
  */
-public class LazyList<T> implements List<T>
+public class LazyList<T> implements List<T>, Serializable
 {
    /** The delegate list */
    private List<T> delegate = Collections.emptyList(); 

Modified: common-core/trunk/src/main/java/org/jboss/util/collection/LazyMap.java
===================================================================
--- common-core/trunk/src/main/java/org/jboss/util/collection/LazyMap.java	2007-11-23 13:34:50 UTC (rev 2684)
+++ common-core/trunk/src/main/java/org/jboss/util/collection/LazyMap.java	2007-12-17 22:44:09 UTC (rev 2685)
@@ -26,16 +26,18 @@
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Set;
+import java.io.Serializable;
 
 /**
  * LazyMap.
+ * It's serializable if the elements are serializable.
  * 
  * @param <K> the key type
  * @param <V> the value type
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @version $Revision$
  */
-public class LazyMap<K, V> implements Map<K, V>
+public class LazyMap<K, V> implements Map<K, V>, Serializable
 {
    /** The delegate map */
    private Map<K, V> delegate = Collections.emptyMap();

Modified: common-core/trunk/src/main/java/org/jboss/util/collection/LazySet.java
===================================================================
--- common-core/trunk/src/main/java/org/jboss/util/collection/LazySet.java	2007-11-23 13:34:50 UTC (rev 2684)
+++ common-core/trunk/src/main/java/org/jboss/util/collection/LazySet.java	2007-12-17 22:44:09 UTC (rev 2685)
@@ -26,15 +26,17 @@
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Set;
+import java.io.Serializable;
 
 /**
  * LazySet.
- * 
+ * It's serializable if the elements are serializable.
+ *
  * @param <T> the element type
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @version $Revision$
  */
-public class LazySet<T> implements Set<T>
+public class LazySet<T> implements Set<T>, Serializable
 {
    /** The delegate set */
    private Set<T> delegate = Collections.emptySet();

Modified: common-core/trunk/src/main/java/org/jboss/util/collection/WeakTypeCache.java
===================================================================
--- common-core/trunk/src/main/java/org/jboss/util/collection/WeakTypeCache.java	2007-11-23 13:34:50 UTC (rev 2684)
+++ common-core/trunk/src/main/java/org/jboss/util/collection/WeakTypeCache.java	2007-12-17 22:44:09 UTC (rev 2685)
@@ -132,7 +132,7 @@
     * @param type the paremeterized type
     * @return the info
     */
-   private T getParameterizedType(ParameterizedType type)
+   protected T getParameterizedType(ParameterizedType type)
    {
       // First check if we already have it
       T result = peek(type);
@@ -157,7 +157,7 @@
     * @param type the paremeterized type
     * @return the info
     */
-   private T getWildcardType(WildcardType type)
+   protected T getWildcardType(WildcardType type)
    {
       // TODO JBMICROCONT-131 improve this
       return get(type.getUpperBounds()[0]);
@@ -170,7 +170,7 @@
     * @param type the type variable
     * @return the info
     */
-   private <D extends GenericDeclaration> T getTypeVariable(TypeVariable<D> type)
+   protected <D extends GenericDeclaration> T getTypeVariable(TypeVariable<D> type)
    {
       // TODO JBMICROCONT-131 improve this
       return get(type.getBounds()[0]);
@@ -182,7 +182,7 @@
     * @param type the array type
     * @return the info
     */
-   private T getGenericArrayType(GenericArrayType type)
+   protected T getGenericArrayType(GenericArrayType type)
    {
       // TODO JBMICROCONT-131 this needs implementing properly
       return get(Object[].class);
@@ -229,7 +229,7 @@
     * @param clazz the class
     * @return the info
     */
-   private T getClass(Class<?> clazz)
+   protected T getClass(Class<?> clazz)
    {
       // First check if we already have it
       T result = peek(clazz);




More information about the jboss-svn-commits mailing list