|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.magicproject.tools.MCardCompare
public class MCardCompare
This class represents card's name and offset of card's code in mdb file.
Constructor Summary | |
---|---|
MCardCompare()
Create a new instance of MCardCompare |
|
MCardCompare(java.lang.String name,
int amount,
java.util.Map<java.lang.String,java.lang.String> properties,
long mdbOffset)
Create a new instance of MCardCompare |
|
MCardCompare(java.lang.String name,
long mdbOffset)
Create a new instance of MCardCompare |
Method Summary | |
---|---|
void |
add(int amount)
Add some cards. |
MCardCompare |
clone()
|
int |
compare(MCardCompare o1,
MCardCompare o2)
|
int |
compareTo(MCardCompare o)
|
boolean |
equals(java.lang.Object other)
|
int |
getAmount()
return the associated integer |
Targetable |
getCard(java.io.FileInputStream dbStream)
Return an implementation of card corresponding to this card name. |
java.util.Map<java.lang.String,java.lang.String> |
getConstraints()
|
long |
getMdbOffset()
Return the MDB offset of first byte of card. |
CardModel |
getModel(java.io.FileInputStream dbStream)
Return an implementation of card corresponding to this card name. |
java.lang.String |
getName()
return card's name |
int |
hashCode()
|
void |
remove(int amount)
Remove some cards. |
void |
setAmount(int amount)
|
void |
setMdbOffset(long mdbOffset)
|
void |
setName(java.lang.String realCardName)
|
java.lang.String |
toString()
return the string representation of this item. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MCardCompare()
public MCardCompare(java.lang.String name, long mdbOffset)
name
- card's name.mdbOffset
- The MDB offset of first byte of card.public MCardCompare(java.lang.String name, int amount, java.util.Map<java.lang.String,java.lang.String> properties, long mdbOffset)
name
- card's name.amount
- amount of cardproperties
- the optional properties attached to these cards.mdbOffset
- The MDB offset of first byte of card.Method Detail |
---|
public java.lang.String getName()
public int getAmount()
public void add(int amount)
amount
- the amount of card to add.public void remove(int amount)
amount
- the amount of card to remove.public java.util.Map<java.lang.String,java.lang.String> getConstraints()
public java.lang.String toString()
toString
in class java.lang.Object
public int compare(MCardCompare o1, MCardCompare o2)
compare
in interface java.util.Comparator<MCardCompare>
public boolean equals(java.lang.Object other)
equals
in interface java.util.Comparator<MCardCompare>
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int compareTo(MCardCompare o)
compareTo
in interface java.lang.Comparable<MCardCompare>
public long getMdbOffset()
public void setName(java.lang.String realCardName)
realCardName
- public void setAmount(int amount)
amount
- public void setMdbOffset(long mdbOffset)
mdbOffset
- The mdbOffset to set.public Targetable getCard(java.io.FileInputStream dbStream) throws java.io.IOException
dbStream
- the mdb stream's header.
java.io.IOException
- if io exception occurred.public CardModel getModel(java.io.FileInputStream dbStream) throws java.io.IOException
dbStream
- the mdb stream's header.
java.io.IOException
- if io exception occurred.public MCardCompare clone()
clone
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |