| 132 | } |
| 133 | |
| 134 | @Override |
| 135 | public boolean equals(Object obj) { |
| 136 | if (this == obj) |
| 137 | return true; |
| 138 | |
| 139 | // Note: keep this implementation in-sync with AbstractRecord.compareTo()! |
| 140 | if (obj instanceof AbstractStore that) { |
| 141 | if (size() == that.size()) { |
| 142 | for (int i = 0; i < size(); i++) |
| 143 | if (!deepEqual(get(i), that.get(i))) |
| 144 | return false; |
| 145 | |
| 146 | // If we got through the above loop, the two records are equal |
| 147 | return true; |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | return false; |
| 152 | } |
| 153 | |
| 154 | static final boolean deepEqual(Object thisValue, Object thatValue) { |
| 155 | |