me.xhsun.guildwars2wrapper.model.account.Material 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;
/**
* For more info on MaterialCategory Storage API go here
* Material storage item model class
* Note: for item that is empty the count will be zero
*
* @author xhsun
* @see me.xhsun.guildwars2wrapper.model.Item item info
* @see me.xhsun.guildwars2wrapper.model.MaterialCategory material category info
* @since 2017-02-07
*/
public class Material extends Storage {
private int category;
public int getCategory() {
return category;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Material material = (Material) o;
return getItemId() == material.getItemId() &&
getCount() == material.getCount() &&
category == material.category &&
getBinding() == material.getBinding();
}
@Override
public int hashCode() {
int result = getItemId();
result = 31 * result + getCount();
result = 31 * result + (getBinding() != null ? getBinding().hashCode() : 0);
result = 31 * result + category;
return result;
}
@Override
public String toString() {
return "Material{" +
"id=" + getItemId() +
", count=" + getCount() +
", binding=" + getBinding() +
", category=" + category +
'}';
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy