예제 #1
0
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + ((href == null) ? 0 : href.hashCode());
   result = prime * result + id;
   result = prime * result + level;
   result = prime * result + ((name == null) ? 0 : name.hashCode());
   result = prime * result + ((parent == null) ? 0 : parent.hashCode());
   result = prime * result + sort;
   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;
   Menu other = (Menu) obj;
   if (href == null) {
     if (other.href != null) return false;
   } else if (!href.equals(other.href)) return false;
   if (id != other.id) return false;
   if (level != other.level) return false;
   if (name == null) {
     if (other.name != null) return false;
   } else if (!name.equals(other.name)) return false;
   if (parent == null) {
     if (other.parent != null) return false;
   } else if (!parent.equals(other.parent)) return false;
   if (sort != other.sort) return false;
   return true;
 }