Пример #1
0
 @Override
 public int hashCode() {
   int result = (a ? 1 : 0);
   result = 31 * result + b;
   result = 31 * result + Arrays.hashCode(c);
   result = 31 * result + Arrays.hashCode(d);
   result = 31 * result + e.hashCode();
   result = 31 * result + f.hashCode();
   return result;
 }
Пример #2
0
    @Override
    public boolean equals(Object o) {
      if (this == o) return true;
      if (o == null || getClass() != o.getClass()) return false;

      SimpleJavaBean that = (SimpleJavaBean) o;

      if (a != that.a) return false;
      if (b != that.b) return false;
      if (!Arrays.equals(c, that.c)) return false;
      if (!Arrays.equals(d, that.d)) return false;
      if (!e.equals(that.e)) return false;
      return f.equals(that.f);
    }