me.xhsun.guildwars2wrapper.model.account.Bank 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.account;
import me.xhsun.guildwars2wrapper.model.util.Storage;
import java.util.List;
/**
* For more info on Bank API go here
* Bank item model class
* Note: if slot is empty, API will return null
*
* @author xhsun
* @see me.xhsun.guildwars2wrapper.model.Item item info
* @see me.xhsun.guildwars2wrapper.model.Skin skin info
* @since 2017-02-07
*/
public class Bank extends Storage {
private int skin;
private List upgrades;
private List infusions;
public int getSkinId() {
return skin;
}
public List getUpgradeIds() {
return upgrades;
}
public List getInfusionIds() {
return infusions;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Bank bank = (Bank) o;
return getItemId() == bank.getItemId() &&
getCount() == bank.getCount() &&
getCharges() == bank.getCharges() &&
skin == bank.skin &&
getBinding() == bank.getBinding() &&
(getBoundTo() != null ? getBoundTo().equals(bank.getBoundTo()) : bank.getBoundTo() == null) &&
(upgrades != null ? upgrades.equals(bank.upgrades) : bank.upgrades == null) &&
(infusions != null ? infusions.equals(bank.infusions) : bank.infusions == null);
}
@Override
public int hashCode() {
int result = getItemId();
result = 31 * result + getCount();
result = 31 * result + getCharges();
result = 31 * result + (getBinding() != null ? getBinding().hashCode() : 0);
result = 31 * result + (getBoundTo() != null ? getBoundTo().hashCode() : 0);
result = 31 * result + skin;
result = 31 * result + (upgrades != null ? upgrades.hashCode() : 0);
result = 31 * result + (infusions != null ? infusions.hashCode() : 0);
return result;
}
@Override
public String toString() {
return "Bank{" +
"id=" + getItemId() +
", count=" + getCount() +
", charges=" + getCharges() +
", binding=" + getBinding() +
", bound_to='" + getBoundTo() + '\'' +
", skin=" + skin +
", upgrades=" + upgrades +
", infusions=" + infusions +
'}';
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy