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