felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clem...@apache.org
Subject svn commit: r1643112 - in /felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/handlers/dependency: ServiceList.java ServiceSet.java
Date Mon, 15 Dec 2014 17:12:36 GMT
Author: clement
Date: Wed Dec  3 13:37:00 2014
New Revision: 1643112

URL: http://svn.apache.org/r1643112
Log:
Fix FELIX-4717

Added:
    felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/ServiceList.java
      - copied, changed from r1643080, felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/ServiceCollection.java
    felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/ServiceSet.java
      - copied, changed from r1643080, felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/ServiceCollection.java

Copied: felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/ServiceList.java
(from r1643080, felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/ServiceCollection.java)
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/ServiceList.java?p2=felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/ServiceList.java&p1=felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/ServiceCollection.java&r1=1643080&r2=1643112&rev=1643112&view=diff
==============================================================================
--- felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/ServiceCollection.java
(original)
+++ felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/ServiceList.java
Wed Dec  3 13:37:00 2014
@@ -22,42 +22,44 @@ import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
 import java.util.ListIterator;
-import java.util.Set;
 
 /**
-* Maintains a service object collection.
-* This collection wrap the temporal dependency to be accessible from a
-* {@link Collection}, that can be passed to helper objects (Collaborators).
-* 
-* 
-* The {@link Collection#iterator()} method returns an {@link Iterator} iterating
-* on a cached copy of available service objects. In the case that there are no 
-* available services, the policies act as follows:
-* <ul>
-* <li>'null' returns a null iterator</li>
-* <li>'nullable' and default-implementation returns an iterator iterating on one object
(the
-*  nullable or default-implementation object</li>
-* <li>'empty' returns an empty iterator.</li>
-* </ul>
-* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
-*/
-public class ServiceCollection implements Collection, List, Set {
-    
+ * Maintains a list of service object.
+ * This collection wrap the  dependency to be accessible from a
+ * {@link java.util.Collection} or a {@link java.util.List}, that can be passed to helper
objects (Collaborators).
+ * <p/>
+ * The {@link Collection#iterator()} method returns an {@link Iterator} iterating
+ * on a cached copy of available service objects. In the case that there are no
+ * available services, the policies act as follows:
+ * <ul>
+ * <li>'null' returns a null iterator</li>
+ * <li>'nullable' and default-implementation returns an iterator iterating on one object
(the
+ * nullable or default-implementation object</li>
+ * <li>'empty' returns an empty iterator.</li>
+ * </ul>
+ * Because of FELIX-4717, this class does not implement Set.
+ *
+ * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
+ */
+public class ServiceList implements List {
+
     /**
      * The wrapped dependency.
      */
     private Dependency m_dependency;
-        
+
     /**
      * Creates a Service Collection.
+     *
      * @param dep the wrapped dependency
      */
-    public ServiceCollection(Dependency dep) {
+    public ServiceList(Dependency dep) {
         m_dependency = dep;
     }
 
     /**
      * Unsupported method.
+     *
      * @param o an object
      * @return N/A
      * @see java.util.Collection#add(java.lang.Object)
@@ -68,6 +70,7 @@ public class ServiceCollection implement
 
     /**
      * Unsupported method.
+     *
      * @param c an object
      * @return N/A
      * @see java.util.Collection#addAll(java.util.Collection)
@@ -75,11 +78,12 @@ public class ServiceCollection implement
     public boolean addAll(Collection c) {
         throw new UnsupportedOperationException("Cannot add elements inside this collection");
     }
-    
+
     /**
      * Unsupported method.
+     *
      * @param index an index
-     * @param obj an object
+     * @param obj   an object
      * @see java.util.List#add(int, java.lang.Object)
      */
     public void add(int index, Object obj) {
@@ -88,8 +92,9 @@ public class ServiceCollection implement
 
     /**
      * Unsupported method.
+     *
      * @param index an index
-     * @param c an object
+     * @param c     an object
      * @return N/A
      * @see java.util.List#addAll(int, java.util.Collection)
      */
@@ -99,6 +104,7 @@ public class ServiceCollection implement
 
     /**
      * Unsupported method.
+     *
      * @see java.util.Collection#clear()
      */
     public void clear() {
@@ -108,8 +114,9 @@ public class ServiceCollection implement
     /**
      * Checks if the wrapped dependency has always access to the
      * given service object.The method allows knowing if the provider returning the
-     * service object has left. 
-     * @param o  the service object
+     * service object has left.
+     *
+     * @param o the service object
      * @return <code>true</code> if the object is still available,
      * <code>false</code> otherwise.
      * @see java.util.Collection#contains(java.lang.Object)
@@ -122,7 +129,8 @@ public class ServiceCollection implement
     /**
      * Checks if the wrapped dependencies has always access to the
      * given service objects.The method allows knowing if providers returning the
-     * service objects have left. 
+     * service objects have left.
+     *
      * @param c the set of service object
      * @return <code>true</code> if the objects are still available,
      * <code>false</code> otherwise.
@@ -136,8 +144,9 @@ public class ServiceCollection implement
     /**
      * Checks if at least one provider matching with the dependency
      * is available.
+     *
      * @return <code>true</code> if one provider or more satisfying the
-     * dependency are available. Otherwise, returns <code>false</code> 
+     * dependency are available. Otherwise, returns <code>false</code>
      * @see java.util.Collection#isEmpty()
      */
     public boolean isEmpty() {
@@ -148,6 +157,7 @@ public class ServiceCollection implement
      * Gets an iterator on the current list of available service objects.
      * The returned iterator iterates on a cached copy of the service
      * objects.
+     *
      * @return a iterator giving access to service objects.
      * @see java.util.Collection#iterator()
      */
@@ -155,9 +165,10 @@ public class ServiceCollection implement
         List obj = (List) m_dependency.getService();
         return new ServiceIterator(obj); // Create the service iterator with the service
reference list.
     }
-    
+
     /**
      * Unsupported method.
+     *
      * @param o a object
      * @return N/A
      * @see java.util.Collection#remove(java.lang.Object)
@@ -168,6 +179,7 @@ public class ServiceCollection implement
 
     /**
      * Unsupported method.
+     *
      * @param index the index
      * @return N/A
      * @see java.util.Collection#remove(java.lang.Object)
@@ -178,6 +190,7 @@ public class ServiceCollection implement
 
     /**
      * Unsupported method.
+     *
      * @param c a set of objects
      * @return N/A
      * @see java.util.Collection#removeAll(java.util.Collection)
@@ -188,6 +201,7 @@ public class ServiceCollection implement
 
     /**
      * Unsupported method.
+     *
      * @param c a set of objects
      * @return N/A
      * @see java.util.Collection#retainAll(java.util.Collection)
@@ -198,6 +212,7 @@ public class ServiceCollection implement
 
     /**
      * Gets the number of available providers.
+     *
      * @return the number of matching service providers.
      * @see java.util.Collection#size()
      */
@@ -208,21 +223,23 @@ public class ServiceCollection implement
     /**
      * Returns an array containing available service objects.
      * This method executed on timeout policies if no matching
-     * providers when the timeout is reached. 
+     * providers when the timeout is reached.
+     *
      * @return a array containing available service objects.
      * @see java.util.Collection#toArray()
      */
     public Object[] toArray() {
         return toArray(new Object[0]);
     }
-    
+
     /**
      * Returns an array containing available service objects.
      * This method executed on timeout policies if no matching
-     * providers when the timeout is reached. 
-     * @param a the array into which the elements of this collection 
-     * are to be stored, if it is big enough; otherwise, a new array
-     * of the same runtime type is allocated for this purpose. 
+     * providers when the timeout is reached.
+     *
+     * @param a the array into which the elements of this collection
+     *          are to be stored, if it is big enough; otherwise, a new array
+     *          of the same runtime type is allocated for this purpose.
      * @return a array containing available service objects.
      * @see java.util.Collection#toArray(java.lang.Object[])
      */
@@ -230,9 +247,10 @@ public class ServiceCollection implement
         List list = (List) m_dependency.getService();
         return list.toArray(a);
     }
-    
+
     /**
      * Gets the object stored at the given index.
+     *
      * @param index the index
      * @return the service object
      * @see java.util.List#get(int)
@@ -245,7 +263,8 @@ public class ServiceCollection implement
     /**
      * Gets the index of the given object in the current
      * collection.
-     * @param o the object 
+     *
+     * @param o the object
      * @return the index of the object of <code>-1</code>
      * if not found.
      * @see java.util.List#indexOf(java.lang.Object)
@@ -258,7 +277,8 @@ public class ServiceCollection implement
     /**
      * Gets the last index of the given object in the current
      * collection.
-     * @param o the object 
+     *
+     * @param o the object
      * @return the index of the object of <code>-1</code>
      * if not found.
      * @see java.util.List#lastIndexOf(java.lang.Object)
@@ -272,6 +292,7 @@ public class ServiceCollection implement
      * Gets a list iterator on the current list of available service objects.
      * The returned iterator iterates on a cached copy of the service
      * objects.
+     *
      * @return a iterator giving access to service objects.
      * @see java.util.List#listIterator()
      */
@@ -282,6 +303,7 @@ public class ServiceCollection implement
 
     /**
      * Unsupported Method.
+     *
      * @param index an index
      * @return N/A
      * @see java.util.List#listIterator(int)
@@ -292,6 +314,7 @@ public class ServiceCollection implement
 
     /**
      * Unsupported Method.
+     *
      * @param arg0 an index
      * @param arg1 an object
      * @return N/A
@@ -303,8 +326,9 @@ public class ServiceCollection implement
 
     /**
      * Returns a sublist from the current list.
+     *
      * @param fromIndex the index of the list beginning
-     * @param toIndex the index of the list end
+     * @param toIndex   the index of the list end
      * @return the sub-list
      * @see java.util.List#subList(int, int)
      */
@@ -318,24 +342,26 @@ public class ServiceCollection implement
      * This iterator iterates on a cached copy of service objects.
      */
     private static final class ServiceIterator implements ListIterator {
-        
+
         /**
          * Underlying iterator.
          */
         private ListIterator m_iterator;
-        
+
         /**
          * Creates a Service Iterator iterating
          * on the given set of providers.
+         *
          * @param list the list of service object.
          */
-        private ServiceIterator(List list) {           
+        private ServiceIterator(List list) {
             m_iterator = list.listIterator();
         }
 
         /**
-         * Returns <code>true</code> if the iteration has 
-         * more service objects. 
+         * Returns <code>true</code> if the iteration has
+         * more service objects.
+         *
          * @return <code>true</code> if the iterator has more elements.
          * @see java.util.Iterator#hasNext()
          */
@@ -344,8 +370,9 @@ public class ServiceCollection implement
         }
 
         /**
-         * Returns the next service objects in the iteration. 
-         * @return the next service object in the iteration. 
+         * Returns the next service objects in the iteration.
+         *
+         * @return the next service object in the iteration.
          * @see java.util.Iterator#next()
          */
         public Object next() {
@@ -354,24 +381,27 @@ public class ServiceCollection implement
 
         /**
          * Unsupported operation.
+         *
          * @see java.util.Iterator#remove()
          */
         public void remove() {
-            throw new UnsupportedOperationException();            
+            throw new UnsupportedOperationException();
         }
 
         /**
          * Unsupported operation.
+         *
          * @param obj an object
          * @see java.util.ListIterator#add(Object)
          */
         public void add(Object obj) {
-            throw new UnsupportedOperationException();                        
+            throw new UnsupportedOperationException();
         }
 
         /**
-         * Checks if the is an element before the currently 
+         * Checks if the is an element before the currently
          * pointed one.
+         *
          * @return true if there is an element before the
          * current one.
          * @see java.util.ListIterator#hasPrevious()
@@ -382,6 +412,7 @@ public class ServiceCollection implement
 
         /**
          * Gets the index of the next element.
+         *
          * @return the index of the next element.
          * @see java.util.ListIterator#nextIndex()
          */
@@ -389,9 +420,10 @@ public class ServiceCollection implement
             return m_iterator.nextIndex();
         }
 
-        
+
         /**
          * Gets the previous elements.
+         *
          * @return the previous element
          * @see java.util.ListIterator#previous()
          */
@@ -401,6 +433,7 @@ public class ServiceCollection implement
 
         /**
          * Gets the index of the previous element.
+         *
          * @return the index of the previous element.
          * @see java.util.ListIterator#previousIndex()
          */
@@ -410,13 +443,14 @@ public class ServiceCollection implement
 
         /**
          * Unsupported operation.
+         *
          * @param obj an object
          * @see java.util.ListIterator#set(Object)
          */
         public void set(Object obj) {
-            throw new UnsupportedOperationException();  
+            throw new UnsupportedOperationException();
         }
-                  
+
     }
 
 }

Copied: felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/ServiceSet.java
(from r1643080, felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/ServiceCollection.java)
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/ServiceSet.java?p2=felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/ServiceSet.java&p1=felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/ServiceCollection.java&r1=1643080&r2=1643112&rev=1643112&view=diff
==============================================================================
--- felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/ServiceCollection.java
(original)
+++ felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/ServiceSet.java
Wed Dec  3 13:37:00 2014
@@ -18,49 +18,48 @@
  */
 package org.apache.felix.ipojo.handlers.dependency;
 
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-import java.util.Set;
+import java.util.*;
 
 /**
-* Maintains a service object collection.
-* This collection wrap the temporal dependency to be accessible from a
-* {@link Collection}, that can be passed to helper objects (Collaborators).
-* 
-* 
-* The {@link Collection#iterator()} method returns an {@link Iterator} iterating
-* on a cached copy of available service objects. In the case that there are no 
-* available services, the policies act as follows:
-* <ul>
-* <li>'null' returns a null iterator</li>
-* <li>'nullable' and default-implementation returns an iterator iterating on one object
(the
-*  nullable or default-implementation object</li>
-* <li>'empty' returns an empty iterator.</li>
-* </ul>
-* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
-*/
-public class ServiceCollection implements Collection, List, Set {
-    
+ * Maintains a service object collection.
+ * This collection wrap the dependency to be accessible from a
+ * {@link java.util.Set}, that can be passed to helper objects (Collaborators).
+ * <p/>
+ * The {@link java.util.Collection#iterator()} method returns an {@link java.util.Iterator}
iterating
+ * on a cached copy of available service objects. In the case that there are no
+ * available services, the policies act as follows:
+ * <ul>
+ * <li>'null' returns a null iterator</li>
+ * <li>'nullable' and default-implementation returns an iterator iterating on one object
(the
+ * nullable or default-implementation object</li>
+ * <li>'empty' returns an empty iterator.</li>
+ * </ul>
+ * Because of FELIX-4717, this class does not implement List.
+ *
+ * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
+ */
+public class ServiceSet implements Collection, Set {
+
     /**
      * The wrapped dependency.
      */
     private Dependency m_dependency;
-        
+
     /**
      * Creates a Service Collection.
+     *
      * @param dep the wrapped dependency
      */
-    public ServiceCollection(Dependency dep) {
+    public ServiceSet(Dependency dep) {
         m_dependency = dep;
     }
 
     /**
      * Unsupported method.
+     *
      * @param o an object
      * @return N/A
-     * @see java.util.Collection#add(java.lang.Object)
+     * @see java.util.Collection#add(Object)
      */
     public boolean add(Object o) {
         throw new UnsupportedOperationException("Cannot add elements inside this collection");
@@ -68,6 +67,7 @@ public class ServiceCollection implement
 
     /**
      * Unsupported method.
+     *
      * @param c an object
      * @return N/A
      * @see java.util.Collection#addAll(java.util.Collection)
@@ -75,12 +75,13 @@ public class ServiceCollection implement
     public boolean addAll(Collection c) {
         throw new UnsupportedOperationException("Cannot add elements inside this collection");
     }
-    
+
     /**
      * Unsupported method.
+     *
      * @param index an index
-     * @param obj an object
-     * @see java.util.List#add(int, java.lang.Object)
+     * @param obj   an object
+     * @see java.util.List#add(int, Object)
      */
     public void add(int index, Object obj) {
         throw new UnsupportedOperationException("Cannot add elements inside this collection");
@@ -88,8 +89,9 @@ public class ServiceCollection implement
 
     /**
      * Unsupported method.
+     *
      * @param index an index
-     * @param c an object
+     * @param c     an object
      * @return N/A
      * @see java.util.List#addAll(int, java.util.Collection)
      */
@@ -99,6 +101,7 @@ public class ServiceCollection implement
 
     /**
      * Unsupported method.
+     *
      * @see java.util.Collection#clear()
      */
     public void clear() {
@@ -108,11 +111,12 @@ public class ServiceCollection implement
     /**
      * Checks if the wrapped dependency has always access to the
      * given service object.The method allows knowing if the provider returning the
-     * service object has left. 
-     * @param o  the service object
+     * service object has left.
+     *
+     * @param o the service object
      * @return <code>true</code> if the object is still available,
      * <code>false</code> otherwise.
-     * @see java.util.Collection#contains(java.lang.Object)
+     * @see java.util.Collection#contains(Object)
      */
     public boolean contains(Object o) {
         List list = (List) m_dependency.getService();
@@ -122,11 +126,12 @@ public class ServiceCollection implement
     /**
      * Checks if the wrapped dependencies has always access to the
      * given service objects.The method allows knowing if providers returning the
-     * service objects have left. 
+     * service objects have left.
+     *
      * @param c the set of service object
      * @return <code>true</code> if the objects are still available,
      * <code>false</code> otherwise.
-     * @see java.util.Collection#contains(java.lang.Object)
+     * @see java.util.Collection#contains(Object)
      */
     public boolean containsAll(Collection c) {
         List list = (List) m_dependency.getService();
@@ -136,8 +141,9 @@ public class ServiceCollection implement
     /**
      * Checks if at least one provider matching with the dependency
      * is available.
+     *
      * @return <code>true</code> if one provider or more satisfying the
-     * dependency are available. Otherwise, returns <code>false</code> 
+     * dependency are available. Otherwise, returns <code>false</code>
      * @see java.util.Collection#isEmpty()
      */
     public boolean isEmpty() {
@@ -148,6 +154,7 @@ public class ServiceCollection implement
      * Gets an iterator on the current list of available service objects.
      * The returned iterator iterates on a cached copy of the service
      * objects.
+     *
      * @return a iterator giving access to service objects.
      * @see java.util.Collection#iterator()
      */
@@ -155,12 +162,13 @@ public class ServiceCollection implement
         List obj = (List) m_dependency.getService();
         return new ServiceIterator(obj); // Create the service iterator with the service
reference list.
     }
-    
+
     /**
      * Unsupported method.
+     *
      * @param o a object
      * @return N/A
-     * @see java.util.Collection#remove(java.lang.Object)
+     * @see java.util.Collection#remove(Object)
      */
     public boolean remove(Object o) {
         throw new UnsupportedOperationException("Cannot remove elements from this collection");
@@ -168,9 +176,10 @@ public class ServiceCollection implement
 
     /**
      * Unsupported method.
+     *
      * @param index the index
      * @return N/A
-     * @see java.util.Collection#remove(java.lang.Object)
+     * @see java.util.Collection#remove(Object)
      */
     public Object remove(int index) {
         throw new UnsupportedOperationException("Cannot remove elements from this collection");
@@ -178,6 +187,7 @@ public class ServiceCollection implement
 
     /**
      * Unsupported method.
+     *
      * @param c a set of objects
      * @return N/A
      * @see java.util.Collection#removeAll(java.util.Collection)
@@ -188,6 +198,7 @@ public class ServiceCollection implement
 
     /**
      * Unsupported method.
+     *
      * @param c a set of objects
      * @return N/A
      * @see java.util.Collection#retainAll(java.util.Collection)
@@ -198,6 +209,7 @@ public class ServiceCollection implement
 
     /**
      * Gets the number of available providers.
+     *
      * @return the number of matching service providers.
      * @see java.util.Collection#size()
      */
@@ -208,31 +220,34 @@ public class ServiceCollection implement
     /**
      * Returns an array containing available service objects.
      * This method executed on timeout policies if no matching
-     * providers when the timeout is reached. 
+     * providers when the timeout is reached.
+     *
      * @return a array containing available service objects.
      * @see java.util.Collection#toArray()
      */
     public Object[] toArray() {
         return toArray(new Object[0]);
     }
-    
+
     /**
      * Returns an array containing available service objects.
      * This method executed on timeout policies if no matching
-     * providers when the timeout is reached. 
-     * @param a the array into which the elements of this collection 
-     * are to be stored, if it is big enough; otherwise, a new array
-     * of the same runtime type is allocated for this purpose. 
+     * providers when the timeout is reached.
+     *
+     * @param a the array into which the elements of this collection
+     *          are to be stored, if it is big enough; otherwise, a new array
+     *          of the same runtime type is allocated for this purpose.
      * @return a array containing available service objects.
-     * @see java.util.Collection#toArray(java.lang.Object[])
+     * @see java.util.Collection#toArray(Object[])
      */
     public Object[] toArray(Object[] a) {
         List list = (List) m_dependency.getService();
         return list.toArray(a);
     }
-    
+
     /**
      * Gets the object stored at the given index.
+     *
      * @param index the index
      * @return the service object
      * @see java.util.List#get(int)
@@ -245,10 +260,11 @@ public class ServiceCollection implement
     /**
      * Gets the index of the given object in the current
      * collection.
-     * @param o the object 
+     *
+     * @param o the object
      * @return the index of the object of <code>-1</code>
      * if not found.
-     * @see java.util.List#indexOf(java.lang.Object)
+     * @see java.util.List#indexOf(Object)
      */
     public int indexOf(Object o) {
         List list = (List) m_dependency.getService();
@@ -258,10 +274,11 @@ public class ServiceCollection implement
     /**
      * Gets the last index of the given object in the current
      * collection.
-     * @param o the object 
+     *
+     * @param o the object
      * @return the index of the object of <code>-1</code>
      * if not found.
-     * @see java.util.List#lastIndexOf(java.lang.Object)
+     * @see java.util.List#lastIndexOf(Object)
      */
     public int lastIndexOf(Object o) {
         List list = (List) m_dependency.getService();
@@ -272,6 +289,7 @@ public class ServiceCollection implement
      * Gets a list iterator on the current list of available service objects.
      * The returned iterator iterates on a cached copy of the service
      * objects.
+     *
      * @return a iterator giving access to service objects.
      * @see java.util.List#listIterator()
      */
@@ -282,6 +300,7 @@ public class ServiceCollection implement
 
     /**
      * Unsupported Method.
+     *
      * @param index an index
      * @return N/A
      * @see java.util.List#listIterator(int)
@@ -292,6 +311,7 @@ public class ServiceCollection implement
 
     /**
      * Unsupported Method.
+     *
      * @param arg0 an index
      * @param arg1 an object
      * @return N/A
@@ -303,8 +323,9 @@ public class ServiceCollection implement
 
     /**
      * Returns a sublist from the current list.
+     *
      * @param fromIndex the index of the list beginning
-     * @param toIndex the index of the list end
+     * @param toIndex   the index of the list end
      * @return the sub-list
      * @see java.util.List#subList(int, int)
      */
@@ -318,24 +339,26 @@ public class ServiceCollection implement
      * This iterator iterates on a cached copy of service objects.
      */
     private static final class ServiceIterator implements ListIterator {
-        
+
         /**
          * Underlying iterator.
          */
         private ListIterator m_iterator;
-        
+
         /**
          * Creates a Service Iterator iterating
          * on the given set of providers.
+         *
          * @param list the list of service object.
          */
-        private ServiceIterator(List list) {           
+        private ServiceIterator(List list) {
             m_iterator = list.listIterator();
         }
 
         /**
-         * Returns <code>true</code> if the iteration has 
-         * more service objects. 
+         * Returns <code>true</code> if the iteration has
+         * more service objects.
+         *
          * @return <code>true</code> if the iterator has more elements.
          * @see java.util.Iterator#hasNext()
          */
@@ -344,8 +367,9 @@ public class ServiceCollection implement
         }
 
         /**
-         * Returns the next service objects in the iteration. 
-         * @return the next service object in the iteration. 
+         * Returns the next service objects in the iteration.
+         *
+         * @return the next service object in the iteration.
          * @see java.util.Iterator#next()
          */
         public Object next() {
@@ -354,24 +378,27 @@ public class ServiceCollection implement
 
         /**
          * Unsupported operation.
+         *
          * @see java.util.Iterator#remove()
          */
         public void remove() {
-            throw new UnsupportedOperationException();            
+            throw new UnsupportedOperationException();
         }
 
         /**
          * Unsupported operation.
+         *
          * @param obj an object
          * @see java.util.ListIterator#add(Object)
          */
         public void add(Object obj) {
-            throw new UnsupportedOperationException();                        
+            throw new UnsupportedOperationException();
         }
 
         /**
-         * Checks if the is an element before the currently 
+         * Checks if the is an element before the currently
          * pointed one.
+         *
          * @return true if there is an element before the
          * current one.
          * @see java.util.ListIterator#hasPrevious()
@@ -382,6 +409,7 @@ public class ServiceCollection implement
 
         /**
          * Gets the index of the next element.
+         *
          * @return the index of the next element.
          * @see java.util.ListIterator#nextIndex()
          */
@@ -389,9 +417,10 @@ public class ServiceCollection implement
             return m_iterator.nextIndex();
         }
 
-        
+
         /**
          * Gets the previous elements.
+         *
          * @return the previous element
          * @see java.util.ListIterator#previous()
          */
@@ -401,6 +430,7 @@ public class ServiceCollection implement
 
         /**
          * Gets the index of the previous element.
+         *
          * @return the index of the previous element.
          * @see java.util.ListIterator#previousIndex()
          */
@@ -410,13 +440,14 @@ public class ServiceCollection implement
 
         /**
          * Unsupported operation.
+         *
          * @param obj an object
          * @see java.util.ListIterator#set(Object)
          */
         public void set(Object obj) {
-            throw new UnsupportedOperationException();  
+            throw new UnsupportedOperationException();
         }
-                  
+
     }
 
 }



Mime
View raw message