예제 #1
0
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = super.hashCode();
   result = prime * result + ((regexImpl == null) ? 0 : regexImpl.hashCode());
   result = prime * result + ((term == null) ? 0 : term.hashCode());
   return result;
 }
예제 #2
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (!super.equals(obj)) return false;
   if (getClass() != obj.getClass()) return false;
   RegexQuery other = (RegexQuery) obj;
   if (regexImpl == null) {
     if (other.regexImpl != null) return false;
   } else if (!regexImpl.equals(other.regexImpl)) return false;
   if (term == null) {
     if (other.term != null) return false;
   } else if (!term.equals(other.term)) return false;
   return true;
 }