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 w w w . ja v a2 s .com import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.base.Objects; /** * Describes one remote / local device by including information such * as name or number of pairs that fit on the screen etc. */ public final class Device { private final String name; private final int pairsCount; @JsonCreator public Device( @JsonProperty("name") String name, @JsonProperty("pairsCount") int pairsCount) { this.name = name; this.pairsCount = pairsCount; } public String getName() { return name; } public int getPairsCount() { return pairsCount; } @Override public boolean equals(Object other) { if (other == null || !(other instanceof Device)) return false; if (other == this) return true; Device device = (Device) other; return Objects.equal(name, device.name) && Objects.equal(pairsCount, device.pairsCount); } @Override public int hashCode() { return Objects.hashCode(name, pairsCount); } }