xworker.finance.exchange.CurrencyActions Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xworker_app Show documentation
Show all versions of xworker_app Show documentation
XWorker app model liberary.
The newest version!
package xworker.finance.exchange;
import org.xmeta.ActionContext;
import org.xmeta.Thing;
public class CurrencyActions {
public static double getExchangeRate(ActionContext actionContext){
Thing self = actionContext.getObject("self");
String baseCode = self.doAction("getBaseCode", actionContext);
String termCode = self.doAction("getTermCode", actionContext);
return CurrencyUtils.getexChangeRate(baseCode, termCode);
}
public static double exchangeRate(ActionContext actionContext){
Thing self = actionContext.getObject("self");
String baseCode = self.doAction("getBaseCode", actionContext);
String termCode = self.doAction("getTermCode", actionContext);
double amount = self.doAction("getAmount", actionContext);
return CurrencyUtils.exchange(baseCode, termCode, amount);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy