Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package t01;
- import java.math.BigDecimal;
- public class Eraser extends OfficeSupply {
- public Eraser(String name, BigDecimal price) {
- super(name, price);
- }
- public boolean equals(Object o) {
- if (o == this) return true;
- if (!(o instanceof Eraser)) return false;
- final Eraser other = (Eraser) o;
- if (!other.canEqual((Object) this)) return false;
- return true;
- }
- public int hashCode() {
- int result = 1;
- return result;
- }
- protected boolean canEqual(Object other) {
- return other instanceof Eraser;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement