@Test public void equalsContractNull() { final Ack x = new AckImpl("ch1", 10L); assertThat(x.equals(null), is(false)); }
@Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof Ack)) { return false; } final AckImpl other = (AckImpl) obj; return channelId == null ? other.channelId == null : channelId.equals(other.channelId); }
AckImpl implements Ack { @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof Ack)) { return false; } final AckImpl other = (AckImpl) obj; return channelId == null ? other.channelId == null : channelId.equals(other.channelId); } }
AckImpl implements Ack { @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof Ack)) { return false; } final AckImpl other = (AckImpl) obj; return channelId == null ? other.channelId == null : channelId.equals(other.channelId); } AckImpl(final String channelId, final long version); }
AckImpl implements Ack { @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof Ack)) { return false; } final AckImpl other = (AckImpl) obj; return channelId == null ? other.channelId == null : channelId.equals(other.channelId); } AckImpl(final String channelId, final long version); @Override String getChannelId(); @Override long getVersion(); @Override String toString(); @Override int hashCode(); @Override boolean equals(final Object obj); }
AckImpl implements Ack { @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof Ack)) { return false; } final AckImpl other = (AckImpl) obj; return channelId == null ? other.channelId == null : channelId.equals(other.channelId); } AckImpl(final String channelId, final long version); @Override String getChannelId(); @Override long getVersion(); @Override String toString(); @Override int hashCode(); @Override boolean equals(final Object obj);  }