|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface presents the group abilities extending java.util.Collection. A Group also permit some 'Map' operations like put, get(key), ...
Collection
Method Summary | |
void |
addMerge(java.lang.Object ogroup)
Merges a group into the group. |
void |
addNamedElement(java.lang.String key,
java.lang.Object value)
Associates the specified value with the specified key in this Group (optional operation). |
boolean |
allArrived()
Checks if all the members of the Group are arrived. |
boolean |
allAwaited()
Checks if all the members of the Group are awaited. |
boolean |
containsKey(java.lang.String key)
Returns true if this Group contains a mapping for the specified key.
|
boolean |
containsValue(java.lang.Object value)
Returns true if this Group maps one or more keys to the specified value.
|
Group |
difference(Group g)
Creates a new group with all members that belong to the group or to the group g , but not to both. |
Group |
exclude(Group g)
Creates a new group with the members that belong to the group, but not to the group g . |
java.lang.Object |
get(int index)
Returns the object at the specified index. |
ExceptionList |
getExceptionList()
Returns an ExceptionList containing all the throwables (exceptions and errors) occured when this group was built |
java.lang.Object |
getGroupByType()
Returns an object representing the group, and assignable from the (upper) class of member. |
java.lang.Object |
getNamedElement(java.lang.String key)
Returns the Object to which this Group maps the specified key. |
java.lang.Class |
getType()
Returns the (upper) class of member. |
java.lang.String |
getTypeName()
Returns the name of the (upper) class of member. |
int |
indexOf(java.lang.Object obj)
Returns the index in the group of the first occurence of the specified element, -1 if the list does not contain this element. |
Group |
intersection(Group g)
Creates a new group with all members that belong to the group and to the group g . |
java.util.Set |
keySet()
Returns a set view of the keys contained in this Group. |
java.util.ListIterator |
listIterator()
Returns a list iterator of the members in this Group (in proper sequence). |
void |
purgeExceptionAndNull()
Removes all exceptions and null references contained in the Group. |
Group |
range(int begin,
int end)
Creates a new group with the members of the group begining at the index begin and ending at the index end . |
java.lang.Object |
remove(int index)
Removes the object at the specified index. |
java.lang.Object |
removeNamedElement(java.lang.String key)
Removes the mapping for this key from the group if it is present. |
void |
setRatioMemberToThread(int i)
Modifies the number of members served by one thread |
Group |
union(Group g)
Creates a new group with all members of the group and all the members of the group g |
void |
waitAll()
Waits that all the members are arrived. |
java.lang.Object |
waitAndGetOne()
Waits that at least one member is arrived and returns it. |
java.lang.Object |
waitAndGetOneThenRemoveIt()
Waits one future is arrived and returns it (removes it from the group). |
java.lang.Object |
waitAndGetTheNth(int n)
Waits that the member at the specified rank is arrived and returns it. |
void |
waitN(int n)
Waits that at least n members are arrived. |
void |
waitOne()
Waits that at least one member is arrived. |
int |
waitOneAndGetIndex()
Waits that at least one member is arrived and returns its index. |
void |
waitTheNth(int n)
Waits that the member at the specified rank is arrived. |
Methods inherited from interface java.util.Collection |
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
Method Detail |
public java.lang.Class getType() throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
public java.lang.String getTypeName()
public java.lang.Object getGroupByType()
public java.lang.Object get(int index)
public void addMerge(java.lang.Object ogroup)
public java.lang.Object remove(int index)
public int indexOf(java.lang.Object obj)
public java.util.ListIterator listIterator()
public void waitAll()
public void waitOne()
public void waitTheNth(int n)
n
- the rank of the awaited member.public void waitN(int n)
n
members are arrived.
n
- the number of awaited members.public java.lang.Object waitAndGetOne()
public java.lang.Object waitAndGetOneThenRemoveIt()
o
. (o
is removed from the group)public java.lang.Object waitAndGetTheNth(int n)
n
- - the rank of the wanted member.
n
in the Group.public int waitOneAndGetIndex()
public boolean allAwaited()
true
if all the members of the Group are awaited.public boolean allArrived()
true
if all the members of the Group are arrived.public ExceptionList getExceptionList()
public void purgeExceptionAndNull()
public void setRatioMemberToThread(int i)
i
- - the new ratiopublic Group union(Group g)
g
g
- - a group
g
. null if the class of the group is incompatible.
public Group intersection(Group g)
g
.
g
- - a group
g
. null if the class of the group is incompatible.
public Group difference(Group g)
g
, but not to both.
g
- - a group
g
. null if the class of the group is incompatible.
public Group exclude(Group g)
g
.
g
- - a group
g
. null if the class of the group is incompatible.
public Group range(int begin, int end)
begin
and ending at the index end
.
begin
- - the begining indexend
- - the ending index
begin
to end
. null
if begin > end
.public boolean containsKey(java.lang.String key)
true
if this Group contains a mapping for the specified key.
More formally, returns true
if and only if this Group contains at
a mapping for a key k
such that (key==null ? k==null : key.equals(k))
.
(There can be at most one such mapping.)
key
- - key whose presence in this Group is to be tested.
true
if this Group contains a mapping for the specified key.
java.lang.ClassCastException
- - if the key is of an inappropriate type for this Group (optional).
java.lang.NullPointerException
- - if the key is null and this Group does not not permit null keys (optional).public boolean containsValue(java.lang.Object value)
true
if this Group maps one or more keys to the specified value.
More formally, returns true
if and only if this Group contains at least
one mapping to a value v
such that (value==null ? v==null : value.equals(v))
.
value
- - value whose presence in this map is to be tested.
true
if this Group maps one or more keys to the specified value.
java.lang.ClassCastException
- - if the value is of an inappropriate type for this Collection (optional).
java.lang.NullPointerException
- - if the value is null and this Group does not not permit null values (optional).public java.lang.Object getNamedElement(java.lang.String key)
null
if the Collection contains no mapping for this key.
A return value of null
does not necessarily indicate that the Collection
contains no mapping for the key; it's also possible that the Group explicitly maps the key to null.
The containsKey operation may be used to distinguish these two cases.
More formally, if this Group contains a mapping from a key k
to a value
v
such that (key==null ? k==null : key.equals(k))
,
then this method returns v
; otherwise it returns null
.
(There can be at most one such mapping.)
key
- - key whose associated value is to be returned.
null
if the map contains no mapping for this key.
java.lang.ClassCastException
- - if the key is of an inappropriate type for this Group (optional).
java.lang.NullPointerException
- - key is null
and this Group does not not permit null keys (optional).public java.lang.Object removeNamedElement(java.lang.String key)
key
- the name of the element
public void addNamedElement(java.lang.String key, java.lang.Object value)
m
is said to contain a mapping for a key
k
if and only if m.containsKey(k)
would return true
.))
In that case, the old value is also removed from the group.
key
- - key with which the specified value is to be associated.value
- - value to be associated with the specified key.
java.lang.UnsupportedOperationException
- - if the put operation is not supported by this Group.
java.lang.ClassCastException
- - if the class of the specified key or value prevents it from being stored in this Group.
java.lang.IllegalArgumentException
- - if some aspect of this key or value prevents it from being stored in this Group.
java.lang.NullPointerException
- - this map does not permit null keys or values, and the specified key or value is null
.public java.util.Set keySet()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |