package app.entities.other; import app.exceptions.steam.InvalidSteamID; import com.fasterxml.jackson.databind.annotation.JsonSerialize; @JsonSerialize public class SteamID { public String steam3; public String steam2; public String steam64; public String community_url; public long account_id; public SteamID(){ } public SteamID(String steam3, String steam2, String steam64, long account_id) { this.steam3 = steam3; this.steam2 = steam2; this.steam64 = steam64; this.community_url = String.format("https://steamcommunity.com/profiles/%s", steam64); this.account_id = account_id; } @Override public String toString(){ return community_url; } public boolean is(SteamID steamID){ try { if (steam64.equals(steamID.steam64)) return true; else return false; } catch (NullPointerException err) { throw new InvalidSteamID(); } } }