@Test public void testEquals() throws Exception { assertEquals(new DeliveryBucketImpl("D1", ""), new DeliveryBucketImpl("D1", "")); assertEquals(new DeliveryBucketImpl("D1", "S001"), new DeliveryBucketImpl("D1", "S001")); assertEquals(new DeliveryBucketImpl("D1", "S002"), new DeliveryBucketImpl("D1", "S002")); assertEquals(new DeliveryBucketImpl("D1", "S002", "Q1"), new DeliveryBucketImpl("D1", "S002", "Q1")); assertFalse(new DeliveryBucketImpl("D1", "").equals(new DeliveryBucketImpl("D2", ""))); assertFalse(new DeliveryBucketImpl("D1", "S001").equals(new DeliveryBucketImpl("D1", "S002"))); assertFalse(new DeliveryBucketImpl("D2", "S001").equals(new DeliveryBucketImpl("D2", "S002"))); assertFalse(new DeliveryBucketImpl("D2", "S001").equals(new DeliveryBucketImpl("D1", "S001"))); assertFalse(new DeliveryBucketImpl("D1", "S001").equals(new DeliveryBucketImpl("D2", "S001"))); assertFalse(new DeliveryBucketImpl("D1", "S001", "Q1").equals(new DeliveryBucketImpl("D2", "S001"))); assertFalse(new DeliveryBucketImpl("D1", "S001").equals(new DeliveryBucketImpl("D2", "S001", "Q1"))); }
@Override public boolean equals(final Object o) { if (this == o) return true; if (!(o instanceof DeliveryBucketImpl)) return false; final DeliveryBucketImpl that = (DeliveryBucketImpl) o; if (!group.equals(that.group)) return false; if (!supplier.equals(that.supplier)) return false; return qualifier.equals(that.qualifier); }
DeliveryBucketImpl implements DeliveryBucket { @Override public boolean equals(final Object o) { if (this == o) return true; if (!(o instanceof DeliveryBucketImpl)) return false; final DeliveryBucketImpl that = (DeliveryBucketImpl) o; if (!group.equals(that.group)) return false; if (!supplier.equals(that.supplier)) return false; return qualifier.equals(that.qualifier); } }
DeliveryBucketImpl implements DeliveryBucket { @Override public boolean equals(final Object o) { if (this == o) return true; if (!(o instanceof DeliveryBucketImpl)) return false; final DeliveryBucketImpl that = (DeliveryBucketImpl) o; if (!group.equals(that.group)) return false; if (!supplier.equals(that.supplier)) return false; return qualifier.equals(that.qualifier); } DeliveryBucketImpl(final String group, final String supplier);  DeliveryBucketImpl(final String group, final String supplier, final String qualifier); }
DeliveryBucketImpl implements DeliveryBucket { @Override public boolean equals(final Object o) { if (this == o) return true; if (!(o instanceof DeliveryBucketImpl)) return false; final DeliveryBucketImpl that = (DeliveryBucketImpl) o; if (!group.equals(that.group)) return false; if (!supplier.equals(that.supplier)) return false; return qualifier.equals(that.qualifier); } DeliveryBucketImpl(final String group, final String supplier);  DeliveryBucketImpl(final String group, final String supplier, final String qualifier); @Override String getGroup(); @Override String getSupplier(); @Override String getQualifier(); @Override int compareTo(final DeliveryBucket bucket); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString(); }
DeliveryBucketImpl implements DeliveryBucket { @Override public boolean equals(final Object o) { if (this == o) return true; if (!(o instanceof DeliveryBucketImpl)) return false; final DeliveryBucketImpl that = (DeliveryBucketImpl) o; if (!group.equals(that.group)) return false; if (!supplier.equals(that.supplier)) return false; return qualifier.equals(that.qualifier); } DeliveryBucketImpl(final String group, final String supplier);  DeliveryBucketImpl(final String group, final String supplier, final String qualifier); @Override String getGroup(); @Override String getSupplier(); @Override String getQualifier(); @Override int compareTo(final DeliveryBucket bucket); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString();  }