All Downloads are FREE. Search and download functionalities are using the official Maven repository.

me.xhsun.guildwars2wrapper.model.v2.World Maven / Gradle / Ivy

There is a newer version: 1.3.2
Show newest version
package me.xhsun.guildwars2wrapper.model.v2;

import me.xhsun.guildwars2wrapper.model.identifiable.NameableInt;

/**
 * For more info on World API go here
* World detail model class
* -id:
* -first digit indicates the world's region
* - 1:NA, 2:EU
* -second digit currently correlates with world's assigned language
* - 1:French, 2:German, 3: Spanish, 0:English or Unknown (?)
* Note: I'm not sure what the second digit means exactly, so I will not provide a getLanguage method * * @author xhsun * @since 2017-02-07 */ public class World extends NameableInt { public enum Region {EU, NA} private String population; public Region getRegion() { switch (Integer.parseInt(Integer.toString(getId()).substring(0, 1))) { case 1: return Region.NA; case 2: return Region.EU; default: return Region.NA; } } public String getPopulation() { return population; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy