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

me.xhsun.guildwars2wrapper.model.guild.Upgrade Maven / Gradle / Ivy

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

import java.util.List;

/**
 * For more info on guild upgrades API go here
* Model class for guild upgrade * * @author xhsun * @since 2017-06-06 */ public class Upgrade { public enum Type { AccumulatingCurrency, BankBag, Boost, Claimable, Consumable, Decoration, GuildHall, GuildHallExpedition, Hub, Queue, Unlock } public enum CostType {Item, Collectible, Currency, Coins} private int id; private String name; private String description; private Type type; private int bag_max_items; private int bag_max_coins; private String icon; private int build_time; private int required_level; private int experience; private List prerequisites; private List costs; public int getId() { return id; } public String getName() { return name; } public String getDescription() { return description; } public Type getType() { return type; } /** * Only used when {@link #type} is {@link Type#BankBag} */ public int getBagMaxItems() { return bag_max_items; } /** * Only used when {@link #type} is {@link Type#BankBag} */ public int getBagMaxCoins() { return bag_max_coins; } public String getIcon() { return icon; } public int getBuildTime() { return build_time; } public int getRequiredLevel() { return required_level; } public int getExperience() { return experience; } /** * @return list of {@link Upgrade} ids */ public List getPrerequisites() { return prerequisites; } public List getCosts() { return costs; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Upgrade upgrade = (Upgrade) o; return id == upgrade.id; } @Override public int hashCode() { return id; } @Override public String toString() { return "Upgrade{" + "id=" + id + ", name='" + name + '\'' + ", description='" + description + '\'' + ", type=" + type + ", bag_max_items=" + bag_max_items + ", bag_max_coins=" + bag_max_coins + ", icon='" + icon + '\'' + ", build_time=" + build_time + ", required_level=" + required_level + ", experience=" + experience + ", prerequisites=" + prerequisites + ", costs=" + costs + '}'; } public class Cost { private CostType type; private String name; private int count; private int item_id; public CostType getType() { return type; } public String getName() { return name; } public int getCount() { return count; } public int getItemId() { return item_id; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Cost cost = (Cost) o; return count == cost.count && item_id == cost.item_id && type == cost.type && (name != null ? name.equals(cost.name) : cost.name == null); } @Override public int hashCode() { int result = type != null ? type.hashCode() : 0; result = 31 * result + (name != null ? name.hashCode() : 0); result = 31 * result + count; result = 31 * result + item_id; return result; } @Override public String toString() { return "Cost{" + "type=" + type + ", name='" + name + '\'' + ", count=" + count + ", item_id=" + item_id + '}'; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy