Back to project page DistributedMemory.
The source code is released under:
Apache License
If you think the Android project DistributedMemory 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.faudroids.distributedmemory.core; //from www . j a v a 2 s . c om import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.base.Objects; public class Player { private final String name; private final int id; @JsonCreator public Player( @JsonProperty("id") int id, @JsonProperty("name") String name) { this.id = id; this.name = name; } public int getId() { return id; } public String getName() { return name; } @Override public boolean equals(Object other) { if (other == null || !(other instanceof Player)) return false; Player player = (Player) other; return name.equals(player.name) && id == player.id; } @Override public int hashCode() { return Objects.hashCode(id, name); } @Override public String toString() { return name; } }