private Object value; // the value of the field we want to match
private Object mask; // the value of the mask we want to match on the
// specified field
- private transient boolean isValid;
+ private boolean isValid;
// To satisfy JAXB
@SuppressWarnings("unused")
cloned.mask = ((byte[]) this.mask).clone();
}
}
+ cloned.type = this.type;
+ cloned.isValid = this.isValid;
} catch (CloneNotSupportedException e) {
logger.error("", e);
}
@Override
public String toString() {
- return type + "(" + getValueString() + "," + getMaskString() + ")";
+ return (mask == null) ? String.format("%s(%s)", getTypeString(), getValueString()) :
+ String.format("%s(%s,%s)", getTypeString(), getValueString(), getMaskString());
}
@Override
if (type != other.type) {
return false;
}
- return (type.equalValues(this.value, other.value) && type.equalMasks(this.mask, other.mask));
+ return type.equals(this.value, other.value, this.mask, other.mask);
}
}