I inherited a tiny repair parts catalogue, completely local and fictional for this example. Two thickness values enter as new BigDecimal("2.0") and new BigDecimal("2.00"). Their compareTo result is zero. Their equals result is false. My HashSet has two entries and the actual bit of steel has begun to look at me in an insolent way.