Currency.java 文件源码

java
阅读 32 收藏 0 点赞 0 评论 0

项目:VanillaPlus 作者:
public Currency(int id, ConfigurationSection section, MComponentManager manager){
    this.id = id;
    this.name = manager.get(section.getString(Node.NAME.get()));
    this.single = manager.get(section.getString("SINGLE"));
    this.alias = section.getString("ALIAS");
    int type = section.getInt("FORMAT_TYPE", 0);
    this.format = (DecimalFormat) NumberFormat.getNumberInstance( type == 0 ? Locale.GERMAN : type == 1 ? Locale.ENGLISH : Locale.FRENCH);
    format.applyPattern(section.getString("FORMAT", "###,###.### "));
    this.step = section.getDouble("STEP", 0.001);
    double temp = ((int)(step*1000))/1000.0;
    if(step < 0.001 || temp != step)
        ErrorLogger.addError("Invalid step amount : " + step);
    this.min = ((int)section.getDouble("MIN", 0)/step)*step;
    this.max = ((int)section.getDouble("MAX", 9999999999.999)/step)*step;
    this.allowPay = section.getBoolean("ALLOW_PAY", false);
    this.useServer = section.getBoolean("USE_SERVER", false);
    this.booster = 1.0;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号