@Test public void equalsTest() { String sw = "lala\"lala"; String se = "eeee\"eeee"; EntityTag w = new EntityTag(sw, true); EntityTag w2 = new EntityTag(se, true); EntityTag e = new EntityTag(sw); EntityTag e2 = new EntityTag(se); assertNotEquals(w, w2); assertNotEquals(e, e2); assertNotEquals(w, e2); assertNotEquals(e, w2); assertNotEquals(w, e); assertEquals(e, e); assertEquals(e2, e2); assertEquals(w, w); assertEquals(w2, w2); }
@Override public boolean equals(Object o) { if (o == null) { return false; } if (this == o) { return true; } if (!(o instanceof EntityTag)) { return false; } EntityTag other = (EntityTag) o; return Objects.equals(value, other.value) && weak == other.weak; }
EntityTag { @Override public boolean equals(Object o) { if (o == null) { return false; } if (this == o) { return true; } if (!(o instanceof EntityTag)) { return false; } EntityTag other = (EntityTag) o; return Objects.equals(value, other.value) && weak == other.weak; } }
EntityTag { @Override public boolean equals(Object o) { if (o == null) { return false; } if (this == o) { return true; } if (!(o instanceof EntityTag)) { return false; } EntityTag other = (EntityTag) o; return Objects.equals(value, other.value) && weak == other.weak; } EntityTag(final String value);  EntityTag(final String value, final boolean weak); }
EntityTag { @Override public boolean equals(Object o) { if (o == null) { return false; } if (this == o) { return true; } if (!(o instanceof EntityTag)) { return false; } EntityTag other = (EntityTag) o; return Objects.equals(value, other.value) && weak == other.weak; } EntityTag(final String value);  EntityTag(final String value, final boolean weak); static EntityTag valueOf(String value); @Override int hashCode(); @Override boolean equals(Object o); String getValue(); boolean isWeak(); @Override String toString(); static void appendQuoted(StringBuilder b, String value); static void appendEscapingQuotes(StringBuilder b, String value); }
EntityTag { @Override public boolean equals(Object o) { if (o == null) { return false; } if (this == o) { return true; } if (!(o instanceof EntityTag)) { return false; } EntityTag other = (EntityTag) o; return Objects.equals(value, other.value) && weak == other.weak; } EntityTag(final String value);  EntityTag(final String value, final boolean weak); static EntityTag valueOf(String value); @Override int hashCode(); @Override boolean equals(Object o); String getValue(); boolean isWeak(); @Override String toString(); static void appendQuoted(StringBuilder b, String value); static void appendEscapingQuotes(StringBuilder b, String value); static final EntityTag ANY_MATCH; }