|
|||||||||
Home >> All >> alice >> [ respect overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |
alice.respect
Class EventSetImpl

java.lang.Objectalice.respect.EventSetImpl
- All Implemented Interfaces:
- alice.tuplemedium.EventSet
- public class EventSetImpl
- extends java.lang.Object
- implements alice.tuplemedium.EventSet
- extends java.lang.Object
Naive implementation of the EventSet interface, defining the behaviour of the component managin vm events storage.
Field Summary | |
private java.util.ArrayList |
events
|
private java.util.Random |
rand
|
Constructor Summary | |
EventSetImpl()
|
Method Summary | |
void |
add(alice.tuplemedium.Event t)
Adds an event to the multiset |
void |
empty()
Empties the multiset |
alice.tuplemedium.Event |
get()
Gets (with removal) not-deterministically an event from the mset |
alice.tuplemedium.Event |
getFirstMatching(alice.tuplemedium.TupleSet tset)
Gets (with removal) non-deterministically an event with a tuple template matching a tuple in the specified tuple set |
java.util.Iterator |
getIterator()
Gets an iterator to navigate through the elements of the multiset |
boolean |
isEmpty()
tests if multiset is empty |
void |
removeEventsOf(alice.tuplemedium.AgentId id)
Removes all the events with a specified agent identifier |
int |
size()
Gets the number of events inside the multiset |
void |
sub(alice.tuplemedium.Event t)
Removes (if present) an event from multiset |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
events
private java.util.ArrayList events
rand
private java.util.Random rand
Constructor Detail |
EventSetImpl
public EventSetImpl()
Method Detail |
add
public void add(alice.tuplemedium.Event t)
- Description copied from interface:
alice.tuplemedium.EventSet
- Adds an event to the multiset
- Specified by:
add
in interfacealice.tuplemedium.EventSet
sub
public void sub(alice.tuplemedium.Event t)
- Description copied from interface:
alice.tuplemedium.EventSet
- Removes (if present) an event from multiset
- Specified by:
sub
in interfacealice.tuplemedium.EventSet
isEmpty
public boolean isEmpty()
- Description copied from interface:
alice.tuplemedium.EventSet
- tests if multiset is empty
- Specified by:
isEmpty
in interfacealice.tuplemedium.EventSet
empty
public void empty()
- Description copied from interface:
alice.tuplemedium.EventSet
- Empties the multiset
- Specified by:
empty
in interfacealice.tuplemedium.EventSet
size
public int size()
- Description copied from interface:
alice.tuplemedium.EventSet
- Gets the number of events inside the multiset
- Specified by:
size
in interfacealice.tuplemedium.EventSet
get
public alice.tuplemedium.Event get()
- Description copied from interface:
alice.tuplemedium.EventSet
- Gets (with removal) not-deterministically an event from the mset
- Specified by:
get
in interfacealice.tuplemedium.EventSet
getFirstMatching
public alice.tuplemedium.Event getFirstMatching(alice.tuplemedium.TupleSet tset)
- Description copied from interface:
alice.tuplemedium.EventSet
- Gets (with removal) non-deterministically an event with a tuple template
matching a tuple in the specified tuple set
- Specified by:
getFirstMatching
in interfacealice.tuplemedium.EventSet
getIterator
public java.util.Iterator getIterator()
- Description copied from interface:
alice.tuplemedium.EventSet
- Gets an iterator to navigate through the elements of the multiset
- Specified by:
getIterator
in interfacealice.tuplemedium.EventSet
removeEventsOf
public void removeEventsOf(alice.tuplemedium.AgentId id)
- Description copied from interface:
alice.tuplemedium.EventSet
- Removes all the events with a specified agent identifier
- Specified by:
removeEventsOf
in interfacealice.tuplemedium.EventSet
|
|||||||||
Home >> All >> alice >> [ respect overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |