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

me.xhsun.guildwars2wrapper.model.commerce.Prices Maven / Gradle / Ivy

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

import com.google.gson.annotations.Expose;

/**
 * For more info on Listing Price API go here
* TP prices info model class
* Note: the unit price is in coins * * @author xhsun * @see me.xhsun.guildwars2wrapper.model.Item Item id * @see Prices buy/sell price * @since 2017-02-07 */ public class Prices { private int id; private boolean whitelisted; private Price buys; private Price sells; public int getItemId() { return id; } public boolean isWhitelisted() { return whitelisted; } public Price getBuys() { return buys; } public Price getSells() { return sells; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Prices prices = (Prices) o; return id == prices.id && whitelisted == prices.whitelisted; } @Override public int hashCode() { int result = id; result = 31 * result + (whitelisted ? 1 : 0); return result; } @Override public String toString() { return "Prices{" + "id=" + id + ", whitelisted=" + whitelisted + ", buys=" + buys + ", sells=" + sells + '}'; } /** * Price model for Prices class * * @author xhsun * @since 2017-02-07 */ public static class Price { @Expose private long unit_price; @Expose private long quantity; public long getUnitPrice() { return unit_price; } public long getQuantity() { return quantity; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Price price = (Price) o; return unit_price == price.unit_price && quantity == price.quantity; } @Override public int hashCode() { int result = (int) (unit_price ^ (unit_price >>> 32)); result = 31 * result + (int) (quantity ^ (quantity >>> 32)); return result; } @Override public String toString() { return "Price{" + "unit_price=" + unit_price + ", quantity=" + quantity + '}'; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy