|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmauda.operation.OperationQueue
public class OperationQueue
Storage of a collection of multiple base-operations.
Additionally this class has several needed methods to
manipulate or generate new OperationQueue's. For Example:
- shuffle
- get all permutations of the operations the queue holds
- execution of the whole cue
- load
- save
| Constructor Summary | |
|---|---|
OperationQueue()
Creates a OperationQueue |
|
| Method Summary | |
|---|---|
void |
add(Operation operation)
Adds a Operation |
void |
add(java.lang.String id)
Adds a Operation via ID |
void |
addAll(OperationQueue o)
Adds all Operations of the delivered OperationQueue to this OperationQueue |
java.lang.Object |
clone()
|
int |
compareTo(java.lang.Object o)
|
void |
execute(java.lang.Object o)
Executes all Operations in this queue on the data-structure, by calling the execute-Method of all its Operation's |
Operation |
get(int index)
Gets the index'th Operation of this queue |
OperationQueue[] |
getPermutations()
Gets all permutations of this OperationQueue |
int |
getRating()
Returns the accumulated rating of all Operations |
int |
length()
Gets the length |
void |
load(java.util.Vector vector)
Loads this OperationQueue with the values from a vector- representation readed from e.g. a xml-file. |
void |
remove(int index)
Removes a operation at a specified index |
java.util.Vector |
save()
Converts this queue in a vector-representation for saving- purposes. |
void |
set(int index,
Operation op)
Sets a operation at the specified index |
void |
setRating(int rating)
Sets the rating |
void |
shuffle()
Shuffles the operations in this queue |
void |
shuffleDelmin()
Shuffles the operations so that DELETE_MIN lies inside the last 4 operations. |
Operation[] |
toArray()
Converts this OperationQueue to an array |
java.lang.String |
toString()
|
java.util.Vector |
toVector()
Converts this OperationQueue to an vector |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public OperationQueue()
| Method Detail |
|---|
public void add(java.lang.String id)
id - operation-IDpublic void add(Operation operation)
operation - Operationpublic void addAll(OperationQueue o)
o - OperationQueuepublic Operation get(int index)
index - Index
public void set(int index,
Operation op)
index - Index to store the delivered Operationop - The new Operation for the position at Indexpublic void remove(int index)
index - Index of the to removed operationpublic void shuffle()
public void shuffleDelmin()
public OperationQueue[] getPermutations()
public Operation[] toArray()
public java.util.Vector toVector()
public int length()
public int getRating()
public void setRating(int rating)
rating - Ratingpublic int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparablepublic java.lang.Object clone()
clone in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic void execute(java.lang.Object o)
o - data-structure-objectSimpleOperation.execute(Object)public java.util.Vector save()
public void load(java.util.Vector vector)
vector - vector-representation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||