@Override public boolean equals(Object o){
  if (this == o)   return true;
  if (o == null || getClass() != o.getClass())   return false;
  Insets insets=(Insets)o;
  if (bottom != insets.bottom)   return false;
  if (left != insets.left)   return false;
  if (right != insets.right)   return false;
  if (top != insets.top)   return false;
  return true;
}

@ Override public boolean equals ( Object o ) { if ( this == o ) return true ; if ( o == null || getClass ( ) != o . getClass ( ) ) return false ; Insets insets = ( Insets ) o ; if ( bottom != insets . bottom ) return false ; if ( left != insets . left ) return false ; if ( right != insets . right ) return false ; if ( top != insets . top ) return false ; return true ; }
two insets instances are equal iff they belong to the same class and their fields are pairwise equal .
