me.xhsun.guildwars2wrapper.model.v2.World Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gw2wrapper Show documentation
Show all versions of gw2wrapper Show documentation
Guild Wars 2 API wrapper for Android
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