@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + getIndex(); result = prime * result + getRawValue().hashCode(); result = prime * result + (getDirtyState() ? 1231 : 1237); return result; }
@Override public boolean equals(Object obj) { if (obj == this) return true; if (obj instanceof WrappedWatchableObject) { WrappedWatchableObject that = (WrappedWatchableObject) obj; return this.getIndex() == that.getIndex() && this.getRawValue().equals(that.getRawValue()) && this.getDirtyState() == that.getDirtyState(); } return false; }
@Override public String toString() { return "DataWatcherItem[index=" + getIndex() + ", value=" + getValue() + ", dirty=" + getDirtyState() + "]"; }
boolean isDirty = watch.getDirtyState(); boolean isDirty = watch.getDirtyState();