Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null || !(obj instanceof AgentStatementInfo))
- return false;
- try {
- Field fields[] = getClass().getDeclaredFields();
- for (Field field : fields) {
- Object val = field.get(obj);
- Object thisVal = field.get(this);
- if (!(val instanceof MPaymentInsurer)
- && !((val == null && thisVal == null)
- || (val == thisVal)
- || (val != null && val.equals(thisVal))))
- return false;
- }
- } catch (SecurityException e) {
- e.printStackTrace();
- } catch (IllegalArgumentException e) {
- e.printStackTrace();
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- }
- return true;
- }
Add Comment
Please, Sign In to add comment