@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Field other = (Field) obj; if (expression == null) { if (other.expression != null) return false; } else { return expression.equals(other.expression); } return true; }