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

java.lang.Objectalice.respect.TRSetImpl
- All Implemented Interfaces:
- alice.tuplemedium.TRSet
- public class TRSetImpl
- extends java.lang.Object
- implements alice.tuplemedium.TRSet
- extends java.lang.Object
Naive implementation of the TRSet interface, defining the behaviour of the component that manages triggered reactions.
Field Summary | |
private java.util.Random |
rand
|
private java.util.ArrayList |
tAdded
|
private boolean |
transaction
|
private java.util.ArrayList |
tRemoved
|
private java.util.ArrayList |
trigs
|
Constructor Summary | |
TRSetImpl()
|
Method Summary | |
void |
add(alice.tuplemedium.TriggeredReaction t)
Adds a triggered reaction to the multiset |
void |
beginTransaction()
Begins a transaction section Every operation on multiset can be undone |
void |
empty()
Empties the multiset |
void |
endTransaction(boolean commit)
Ends a transaction section specifying if operations must be committed or undone |
alice.tuplemedium.TriggeredReaction |
get()
Gets not-deterministically (with removal) a triggered reaction from the multiset |
java.util.Iterator |
getIterator()
Gets an iterator to navigate through triggered reactions |
boolean |
isEmpty()
Tests if the multiset is empty |
void |
sub(alice.tuplemedium.TriggeredReaction t)
Removes a triggered reaction from the multiset |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
trigs
private java.util.ArrayList trigs
tAdded
private java.util.ArrayList tAdded
tRemoved
private java.util.ArrayList tRemoved
transaction
private boolean transaction
rand
private java.util.Random rand
Constructor Detail |
TRSetImpl
public TRSetImpl()
Method Detail |
add
public void add(alice.tuplemedium.TriggeredReaction t)
- Description copied from interface:
alice.tuplemedium.TRSet
- Adds a triggered reaction to the multiset
- Specified by:
add
in interfacealice.tuplemedium.TRSet
sub
public void sub(alice.tuplemedium.TriggeredReaction t)
- Description copied from interface:
alice.tuplemedium.TRSet
- Removes a triggered reaction from the multiset
- Specified by:
sub
in interfacealice.tuplemedium.TRSet
isEmpty
public boolean isEmpty()
- Description copied from interface:
alice.tuplemedium.TRSet
- Tests if the multiset is empty
- Specified by:
isEmpty
in interfacealice.tuplemedium.TRSet
empty
public void empty()
- Description copied from interface:
alice.tuplemedium.TRSet
- Empties the multiset
- Specified by:
empty
in interfacealice.tuplemedium.TRSet
get
public alice.tuplemedium.TriggeredReaction get()
- Description copied from interface:
alice.tuplemedium.TRSet
- Gets not-deterministically (with removal) a triggered reaction from
the multiset
- Specified by:
get
in interfacealice.tuplemedium.TRSet
getIterator
public java.util.Iterator getIterator()
- Description copied from interface:
alice.tuplemedium.TRSet
- Gets an iterator to navigate through triggered reactions
- Specified by:
getIterator
in interfacealice.tuplemedium.TRSet
beginTransaction
public void beginTransaction()
- Description copied from interface:
alice.tuplemedium.TRSet
- Begins a transaction section
Every operation on multiset can be undone
- Specified by:
beginTransaction
in interfacealice.tuplemedium.TRSet
endTransaction
public void endTransaction(boolean commit)
- Description copied from interface:
alice.tuplemedium.TRSet
- Ends a transaction section specifying
if operations must be committed or undone
- Specified by:
endTransaction
in interfacealice.tuplemedium.TRSet
|
|||||||||
Home >> All >> alice >> [ respect overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |