/// <summary>Returns true iff <code>o</code> is equal to this. </summary> public override bool Equals(System.Object o) { if (this == o) { return(true); } if (!(o is RangeQuery)) { return(false); } RangeQuery other = (RangeQuery)o; if (this.GetBoost() != other.GetBoost()) { return(false); } if (this.inclusive != other.inclusive) { return(false); } // one of lowerTerm and upperTerm can be null if (this.lowerTerm != null?!this.lowerTerm.Equals(other.lowerTerm):other.lowerTerm != null) { return(false); } if (this.upperTerm != null?!this.upperTerm.Equals(other.upperTerm):other.upperTerm != null) { return(false); } return(true); }