(Object obj)
| 98 | } |
| 99 | |
| 100 | @SuppressWarnings("unchecked") // catching CCE |
| 101 | @Override |
| 102 | public boolean equals(Object obj) { |
| 103 | if (obj instanceof Cut) { |
| 104 | // It might not really be a Cut<C>, but we'll catch a CCE if it's not |
| 105 | Cut<C> that = (Cut<C>) obj; |
| 106 | try { |
| 107 | int compareResult = compareTo(that); |
| 108 | return compareResult == 0; |
| 109 | } catch (ClassCastException ignored) {} |
| 110 | } |
| 111 | return false; |
| 112 | } |
| 113 | |
| 114 | /* |
| 115 | * The implementation neither produces nor consumes any non-null instance of type C, so |