Esempio n. 1
0
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = super.hashCode();
   result = prime * result + ((angle == null) ? 0 : angle.hashCode());
   return result;
 }
Esempio n. 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;
   Direction other = (Direction) obj;
   if (angle == null) {
     if (other.angle != null) return false;
   } else if (!angle.equals(other.angle)) return false;
   return true;
 }