net.sf.magicproject.event.context
Class MContextCardCardIntInt

java.lang.Object
  extended by net.sf.magicproject.event.context.MContextMtargetable
      extended by net.sf.magicproject.event.context.MContextCardCardIntInt
All Implemented Interfaces:
ContextEventListener
Direct Known Subclasses:
MContextCardCardIntIntTest

public class MContextCardCardIntInt
extends MContextMtargetable

Since:
0.63
Author:
Fabrice Daugan

Constructor Summary
MContextCardCardIntInt(Targetable dest)
          Creates a new instance of MContextCardCardIntInt
MContextCardCardIntInt(Targetable dest, int value)
          Creates a new instance of MContextCardCardIntInt
MContextCardCardIntInt(Targetable dest, MCard source)
          Creates a new instance of MContextCardCardIntInt
MContextCardCardIntInt(Targetable dest, MCard source, int value, int value2)
          Creates a new instance of MContextCardCardIntInt
MContextCardCardIntInt(Targetable dest, MCard source, int value, int value2, int maxTimeStamp1, int maxTimeStamp2)
          Creates a new instance of MContextCardCardIntInt
 
Method Summary
 boolean checkTimeStamp(MCard card)
          Verify the timestamp of the specified card
 boolean equals(java.lang.Object context)
           
 MCard getCard2()
          Return the MTargetable cast to MCard object of this context considering it's timstamp.
 MCard getOriginalCard2()
          Return the MTargetable cast to MCard object of this context without considering it's timstamp.
 int getValue()
          Returns The integer that was saved.
 int getValue2()
          Returns The other integer that was saved.
 int hashCode()
           
 boolean isNull2()
          Indicates wether the second card is null or not.
 void removeTimestamp()
          Decrement the reference counter for the current timestamp of this card.
 java.lang.String toString()
           
 
Methods inherited from class net.sf.magicproject.event.context.MContextMtargetable
getCard, getEventSource, getOriginalCard, getOriginalTargetable, getPlayer, getTargetable, getZoneContext
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MContextCardCardIntInt

public MContextCardCardIntInt(Targetable dest)
Creates a new instance of MContextCardCardIntInt

Parameters:
dest - the MTargetable object to save to this context.

MContextCardCardIntInt

public MContextCardCardIntInt(Targetable dest,
                              int value)
Creates a new instance of MContextCardCardIntInt

Parameters:
dest - the MTargetable object to save to this context.
value - the integer to save to this context.

MContextCardCardIntInt

public MContextCardCardIntInt(Targetable dest,
                              MCard source)
Creates a new instance of MContextCardCardIntInt

Parameters:
dest - the MTargetable object to save to this context.
source - the Mcard object to save to this context.

MContextCardCardIntInt

public MContextCardCardIntInt(Targetable dest,
                              MCard source,
                              int value,
                              int value2)
Creates a new instance of MContextCardCardIntInt

Parameters:
dest - the MTargetable object to save to this context.
source - the Mcard object to save to this context.
value - the integer to save to this context.
value2 - the integer to save to this context.

MContextCardCardIntInt

public MContextCardCardIntInt(Targetable dest,
                              MCard source,
                              int value,
                              int value2,
                              int maxTimeStamp1,
                              int maxTimeStamp2)
Creates a new instance of MContextCardCardIntInt

Parameters:
dest - the MTargetable object to save to this context.
source - the Mcard object to save to this context.
value - the integer to save to this context.
value2 - the integer to save to this context.
maxTimeStamp1 - is the maximum timestamp allowed for destination card during the resolution.
maxTimeStamp2 - is the maximum timestamp allowed for source card during the resolution.
Method Detail

getCard2

public MCard getCard2()
Return the MTargetable cast to MCard object of this context considering it's timstamp. The returned object is the same as it was when this context has been created.

Returns:
The other Card object that was saved.

getOriginalCard2

public MCard getOriginalCard2()
Return the MTargetable cast to MCard object of this context without considering it's timstamp.

Returns:
the MTargetable cast to MCard object of this context without considering it's timstamp.

removeTimestamp

public void removeTimestamp()
Description copied from interface: ContextEventListener
Decrement the reference counter for the current timestamp of this card.

Specified by:
removeTimestamp in interface ContextEventListener
Overrides:
removeTimestamp in class MContextMtargetable

getValue

public final int getValue()
Returns The integer that was saved.

Returns:
The integer that was saved.

getValue2

public final int getValue2()
Returns The other integer that was saved.

Returns:
The other integer that was saved.

checkTimeStamp

public boolean checkTimeStamp(MCard card)
Description copied from interface: ContextEventListener
Verify the timestamp of the specified card

Specified by:
checkTimeStamp in interface ContextEventListener
Overrides:
checkTimeStamp in class MContextMtargetable
Parameters:
card - the concerned object.
Returns:
true if the timestamp is correct.

isNull2

public boolean isNull2()
Indicates wether the second card is null or not.

Returns:
true if the second card is null.

equals

public boolean equals(java.lang.Object context)
Overrides:
equals in class MContextMtargetable

hashCode

public int hashCode()
Overrides:
hashCode in class MContextMtargetable

toString

public java.lang.String toString()
Overrides:
toString in class MContextMtargetable


Copyright © 2003-2007 Magic-Project. All Rights Reserved.