|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmauda.operation.SimpleOperation
mauda.operation.Operation
public class Operation
Storage of a base operation (e.g. FibHeap -> decrease-key) with at most 2 parameters.
| Field Summary | |
|---|---|
static int |
SORT_BY_NAME
Identify that a sorting-algorithm should compare operations by its IDs |
static int |
SORT_BY_RATING
Identify that a sorting-algorithm should compare operations by its ratings. |
| Fields inherited from class mauda.operation.SimpleOperation |
|---|
NULL |
| Constructor Summary | |
|---|---|
Operation()
Creates a Operation |
|
Operation(java.lang.String id)
Creates a operation from the delivered ID |
|
Operation(java.lang.String id,
int param1,
int param2,
int rating)
Creates a operation from the delivered parameters |
|
| Method Summary | |
|---|---|
void |
add(SubOperation so)
Adds a SubOperation to the SubOperationQueue |
java.lang.Object |
clone()
|
int |
compareTo(java.lang.Object o)
|
boolean |
equals(java.lang.Object o)
|
void |
execute(java.lang.Object o)
Executes an operation on the data-structure. |
int |
getRating()
Gets the rating |
SubOperationQueue |
getSubOperationQueue()
|
boolean |
isExecuted()
Gets the execute-state |
void |
load(java.lang.String opString)
Loads this operation from a string-representation |
java.lang.String |
out()
Creates a string-representation of this operation, that can be used in GUIs. |
java.lang.String |
save()
Creates a string-representation of this operation for saving- purposes. |
void |
setEffect(int effect)
Sets an effect of an operation, if one exists. |
void |
setExecution(boolean execute)
Sets if the operation should completely executed on the data-structure. |
void |
setRating(int r)
Sets the rating |
static void |
setSort(int mode)
Sets the sorting-mode |
void |
setSubOperationQueue(SubOperationQueue so)
Sets the SubOperations that have to performed to execute this operation |
java.lang.String |
toString()
|
| Methods inherited from class mauda.operation.SimpleOperation |
|---|
compare, getID, getParameter1, getParameter2 |
| Methods inherited from class java.lang.Object |
|---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int SORT_BY_RATING
compareTo(Object),
Constant Field Valuespublic static final int SORT_BY_NAME
compareTo(Object),
Constant Field Values| Constructor Detail |
|---|
public Operation()
public Operation(java.lang.String id)
id - operation-ID
public Operation(java.lang.String id,
int param1,
int param2,
int rating)
id - operation-IDparam1 - 1st Parameterparam2 - 2nd Parameterrating - Rating of the operation| Method Detail |
|---|
public void setExecution(boolean execute)
execute - public boolean isExecuted()
setExecution(boolean)public void setEffect(int effect)
effect - public static void setSort(int mode)
mode - sorting-modeSORT_BY_RATING,
SORT_BY_NAMEpublic int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparablepublic int getRating()
public void setRating(int r)
r - ratingpublic SubOperationQueue getSubOperationQueue()
public void setSubOperationQueue(SubOperationQueue so)
so - suboperationspublic void add(SubOperation so)
so - SubOperationpublic boolean equals(java.lang.Object o)
equals in interface java.util.Comparatorequals in class SimpleOperationpublic void execute(java.lang.Object o)
SimpleOperation
execute in class SimpleOperationo - data-structurepublic java.lang.Object clone()
clone in class SimpleOperationpublic java.lang.String save()
SimpleOperation
save in class SimpleOperationpublic void load(java.lang.String opString)
SimpleOperation
load in class SimpleOperationopString - string-representationpublic java.lang.String toString()
toString in class SimpleOperationpublic java.lang.String out()
SimpleOperation
out in class SimpleOperation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||