Atavism Version 2018.1AGIS API

atavism.agis.objects
Class Currency

java.lang.Object
  extended by atavism.agis.objects.Currency
All Implemented Interfaces:
java.io.Serializable

public class Currency
extends java.lang.Object
implements java.io.Serializable

Contains the template information for a currency. This object is not stored on the player, it is only used to assist in calculations and conversions.

Author:
Andrew Harrison
See Also:
Serialized Form

Constructor Summary
Currency()
           
Currency(Currency tmpl)
           
Currency(int id, java.lang.String name, java.lang.String icon, java.lang.String description, int maximum)
           
 
Method Summary
 void addConversionOption(int currencyToID, int amountReq, boolean autoConversion)
           
 int getAutoConversionCurrency()
           
 int getConversionAmountReq()
          Returns the amount of currency required to convert to one of the auto conversion currency.
 int getConversionAmountReq(int currencyID)
          Returns the amount of currency required to convert to one of the specified conversion currency.
 java.util.HashMap<java.lang.Integer,java.lang.Integer> getConversionOptions()
           
 java.lang.String getCurrencyDescription()
           
 java.lang.String getCurrencyIcon()
           
 int getCurrencyID()
           
 int getCurrencyMax()
           
 java.lang.String getCurrencyName()
           
 Currency getCurrencyThatConvertsToThis()
          Finds the currency that will auto convert into this currency.
 boolean getExternal()
           
 void setAutoConversionCurrency(int autoConversionCurrency)
           
 void setConversionOptions(java.util.HashMap<java.lang.Integer,java.lang.Integer> conversionOptions)
           
 void setCurrencyDescription(java.lang.String description)
           
 void setCurrencyIcon(java.lang.String icon)
           
 void setCurrencyID(int id)
           
 void setCurrencyMax(int maximumAmount)
           
 void setCurrencyName(java.lang.String name)
           
 void setExternal(boolean external)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Currency

public Currency()

Currency

public Currency(int id,
                java.lang.String name,
                java.lang.String icon,
                java.lang.String description,
                int maximum)

Currency

public Currency(Currency tmpl)
Method Detail

addConversionOption

public void addConversionOption(int currencyToID,
                                int amountReq,
                                boolean autoConversion)

getConversionAmountReq

public int getConversionAmountReq()
Returns the amount of currency required to convert to one of the auto conversion currency.

Returns:

getConversionAmountReq

public int getConversionAmountReq(int currencyID)
Returns the amount of currency required to convert to one of the specified conversion currency.

Returns:

getCurrencyThatConvertsToThis

public Currency getCurrencyThatConvertsToThis()
Finds the currency that will auto convert into this currency. Returns null if there are no currencies that do so.

Returns:

getCurrencyID

public int getCurrencyID()

setCurrencyID

public void setCurrencyID(int id)

getCurrencyName

public java.lang.String getCurrencyName()

setCurrencyName

public void setCurrencyName(java.lang.String name)

getCurrencyIcon

public java.lang.String getCurrencyIcon()

setCurrencyIcon

public void setCurrencyIcon(java.lang.String icon)

getCurrencyDescription

public java.lang.String getCurrencyDescription()

setCurrencyDescription

public void setCurrencyDescription(java.lang.String description)

getCurrencyMax

public int getCurrencyMax()

setCurrencyMax

public void setCurrencyMax(int maximumAmount)

getExternal

public boolean getExternal()

setExternal

public void setExternal(boolean external)

getAutoConversionCurrency

public int getAutoConversionCurrency()

setAutoConversionCurrency

public void setAutoConversionCurrency(int autoConversionCurrency)

getConversionOptions

public java.util.HashMap<java.lang.Integer,java.lang.Integer> getConversionOptions()

setConversionOptions

public void setConversionOptions(java.util.HashMap<java.lang.Integer,java.lang.Integer> conversionOptions)


Copyright © 2018 Dragonsan Studios Sp. z o.o.