|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<Optimization> net.sf.magicproject.clickable.ability.Optimization
public enum Optimization
Enum Constant Summary | |
---|---|
action
Same ability is added only once per action. |
|
choice
Ability is added to the TBZ but during the resolution a prompt asks to controller only one ability to be added to the stack. |
|
context
An ability is not added in the TBZ if the last ability is the same. |
|
event
Same ability is added only once per ability triggering this event. |
|
first
The ability would not be added if it already exists in the TBZ. |
|
follow
An ability is not added in the TBZ if the last ability is the same. |
|
last
The ability would replace any existing ability in the TBZ. |
|
none
no optimization is done. |
Method Summary | |
---|---|
boolean |
addTo(Ability ability,
ContextEventListener context,
java.util.List<TriggeredCard> where)
Add the specified ability to the TBZ. |
static Optimization |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static Optimization[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
void |
write(java.io.OutputStream out)
Wrtite this enum to the given outputstream. |
Methods inherited from class java.lang.Enum |
---|
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final Optimization none
public static final Optimization follow
public static final Optimization first
public static final Optimization last
public static final Optimization action
public static final Optimization choice
public static final Optimization event
public static final Optimization context
Method Detail |
---|
public static Optimization[] values()
for (Optimization c : Optimization.values()) System.out.println(c);
public static Optimization valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified name
java.lang.NullPointerException
- if the argument is nullpublic boolean addTo(Ability ability, ContextEventListener context, java.util.List<TriggeredCard> where)
ability
- the ability to addcontext
- the attached contextwhere
- the list where the constructed triggered card would be added
public void write(java.io.OutputStream out) throws java.io.IOException
out
- the stream ths enum would be written.
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |