Back to project page ScoponeDaPolso.
The source code is released under:
GNU General Public License
If you think the Android project ScoponeDaPolso listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package org.gdg.bari.entities; /* w ww . j av a 2 s .co m*/ import com.google.common.base.Objects; public class Card { private int value; private String seed; //private Constants.SEEDS seed; //referred to Constants.SEED_<something> private String owner; //referred to player id private int status; //CONSTRUCTORS public Card(){ } public Card(String seed, int value){ this.seed = seed; this.value = value; } public Card(String seed, int value, String owner, int status){ this.seed = seed; this.value = value; this.owner = owner; this.status = status; } public int getValue() { return value; } public void setValue(int value) { this.value = value; } /*public Constants.SEEDS getSeed() { return seed; }*/ public String getSeed() { return seed; } /*public void setSeed(Constants.SEEDS seed) { this.seed = seed; }*/ public void setSeed(String seed) { this.seed = seed; } public String getOwner() { return owner; } public void setOwner(String owner) { this.owner = owner; } public int getStatus() { return status; } public void setStatus(int status) { this.status = status; } @Override public String toString(){ return value + " di " + seed; } public int hashCode(){ return Objects.hashCode(this.value, this.seed); } @Override public boolean equals(Object obj){ boolean result = false; if(obj instanceof Card) if(obj == this) result = true; else if(this.getValue() == ((Card) obj).getValue() && this.getSeed().equals(((Card) obj).getSeed())) result = true; return result; } }