|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.ipojo.handlers.dependency.ServiceCollection
public class ServiceCollection
Maintains a service object collection.
This collection wrap the temporal dependency to be accessible from a
Collection
, that can be passed to helper objects (Collaborators).
The Collection.iterator()
method returns an Iterator
iterating
on a cached copy of available service objects. In the case that there are no
available services, the policies act as follows:
Constructor Summary | |
---|---|
ServiceCollection(Dependency dep)
Creates a Service Collection. |
Method Summary | |
---|---|
void |
add(int index,
Object obj)
Unsupported method. |
boolean |
add(Object o)
Unsupported method. |
boolean |
addAll(Collection c)
Unsupported method. |
boolean |
addAll(int index,
Collection c)
Unsupported method. |
void |
clear()
Unsupported method. |
boolean |
contains(Object o)
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. |
boolean |
containsAll(Collection c)
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. |
Object |
get(int index)
Gets the object stored at the given index. |
int |
indexOf(Object o)
Gets the index of the given object in the current collection. |
boolean |
isEmpty()
Checks if at least one provider matching with the dependency is available. |
Iterator |
iterator()
Gets an iterator on the current list of available service objects. |
int |
lastIndexOf(Object o)
Gets the last index of the given object in the current collection. |
ListIterator |
listIterator()
Gets a list iterator on the current list of available service objects. |
ListIterator |
listIterator(int index)
Unsupported Method. |
Object |
remove(int index)
Unsupported method. |
boolean |
remove(Object o)
Unsupported method. |
boolean |
removeAll(Collection c)
Unsupported method. |
boolean |
retainAll(Collection c)
Unsupported method. |
Object |
set(int arg0,
Object arg1)
Unsupported Method. |
int |
size()
Gets the number of available providers. |
List |
subList(int fromIndex,
int toIndex)
Returns a sublist from the current list. |
Object[] |
toArray()
Returns an array containing available service objects. |
Object[] |
toArray(Object[] a)
Returns an array containing available service objects. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.List |
---|
equals, hashCode |
Methods inherited from interface java.util.Set |
---|
equals, hashCode |
Constructor Detail |
---|
public ServiceCollection(Dependency dep)
dep
- the wrapped dependencyMethod Detail |
---|
public boolean add(Object o)
add
in interface Collection
add
in interface List
add
in interface Set
o
- an object
Collection.add(java.lang.Object)
public boolean addAll(Collection c)
addAll
in interface Collection
addAll
in interface List
addAll
in interface Set
c
- an object
Collection.addAll(java.util.Collection)
public void add(int index, Object obj)
add
in interface List
index
- an indexobj
- an objectList.add(int, java.lang.Object)
public boolean addAll(int index, Collection c)
addAll
in interface List
index
- an indexc
- an object
List.addAll(int, java.util.Collection)
public void clear()
clear
in interface Collection
clear
in interface List
clear
in interface Set
Collection.clear()
public boolean contains(Object o)
contains
in interface Collection
contains
in interface List
contains
in interface Set
o
- the service object
true
if the object is still available,
false
otherwise.Collection.contains(java.lang.Object)
public boolean containsAll(Collection c)
containsAll
in interface Collection
containsAll
in interface List
containsAll
in interface Set
c
- the set of service object
true
if the objects are still available,
false
otherwise.Collection.contains(java.lang.Object)
public boolean isEmpty()
isEmpty
in interface Collection
isEmpty
in interface List
isEmpty
in interface Set
true
if one provider or more satisfying the
dependency are available. Otherwise, returns false
Collection.isEmpty()
public Iterator iterator()
iterator
in interface Collection
iterator
in interface List
iterator
in interface Set
Collection.iterator()
public boolean remove(Object o)
remove
in interface Collection
remove
in interface List
remove
in interface Set
o
- a object
Collection.remove(java.lang.Object)
public Object remove(int index)
remove
in interface List
index
- the index
Collection.remove(java.lang.Object)
public boolean removeAll(Collection c)
removeAll
in interface Collection
removeAll
in interface List
removeAll
in interface Set
c
- a set of objects
Collection.removeAll(java.util.Collection)
public boolean retainAll(Collection c)
retainAll
in interface Collection
retainAll
in interface List
retainAll
in interface Set
c
- a set of objects
Collection.retainAll(java.util.Collection)
public int size()
size
in interface Collection
size
in interface List
size
in interface Set
Collection.size()
public Object[] toArray()
toArray
in interface Collection
toArray
in interface List
toArray
in interface Set
Collection.toArray()
public Object[] toArray(Object[] a)
toArray
in interface Collection
toArray
in interface List
toArray
in interface Set
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.
Collection.toArray(java.lang.Object[])
public Object get(int index)
get
in interface List
index
- the index
List.get(int)
public int indexOf(Object o)
indexOf
in interface List
o
- the object
-1
if not found.List.indexOf(java.lang.Object)
public int lastIndexOf(Object o)
lastIndexOf
in interface List
o
- the object
-1
if not found.List.lastIndexOf(java.lang.Object)
public ListIterator listIterator()
listIterator
in interface List
List.listIterator()
public ListIterator listIterator(int index)
listIterator
in interface List
index
- an index
List.listIterator(int)
public Object set(int arg0, Object arg1)
set
in interface List
arg0
- an indexarg1
- an object
java.util.List#set(int, E)
public List subList(int fromIndex, int toIndex)
subList
in interface List
fromIndex
- the index of the list beginningtoIndex
- the index of the list end
List.subList(int, int)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |