@Test public void equals_null() { final BrowserPattern pattern = new BrowserPattern(1, Pattern.compile("[0-9]+"), 1); assertThat(pattern.equals(null)).isFalse(); }
@Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final BrowserPattern other = (BrowserPattern) obj; if (id != other.id) { return false; } if (position != other.position) { return false; } if (!pattern.pattern().equals(other.pattern.pattern())) { return false; } if (pattern.flags() != other.pattern.flags()) { return false; } return true; }
BrowserPattern implements Identifiable, OrderedPattern<BrowserPattern>, Serializable { @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final BrowserPattern other = (BrowserPattern) obj; if (id != other.id) { return false; } if (position != other.position) { return false; } if (!pattern.pattern().equals(other.pattern.pattern())) { return false; } if (pattern.flags() != other.pattern.flags()) { return false; } return true; } }
BrowserPattern implements Identifiable, OrderedPattern<BrowserPattern>, Serializable { @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final BrowserPattern other = (BrowserPattern) obj; if (id != other.id) { return false; } if (position != other.position) { return false; } if (!pattern.pattern().equals(other.pattern.pattern())) { return false; } if (pattern.flags() != other.pattern.flags()) { return false; } return true; } BrowserPattern(@Nonnegative final int id, @Nonnull final Pattern pattern, @Nonnegative final int position); }
BrowserPattern implements Identifiable, OrderedPattern<BrowserPattern>, Serializable { @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final BrowserPattern other = (BrowserPattern) obj; if (id != other.id) { return false; } if (position != other.position) { return false; } if (!pattern.pattern().equals(other.pattern.pattern())) { return false; } if (pattern.flags() != other.pattern.flags()) { return false; } return true; } BrowserPattern(@Nonnegative final int id, @Nonnull final Pattern pattern, @Nonnegative final int position); @Override int compareTo(final BrowserPattern other); @Override boolean equals(final Object obj); @Override int getId(); @Override Pattern getPattern(); @Override int getPosition(); @Override int hashCode(); @Override String toString(); }
BrowserPattern implements Identifiable, OrderedPattern<BrowserPattern>, Serializable { @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final BrowserPattern other = (BrowserPattern) obj; if (id != other.id) { return false; } if (position != other.position) { return false; } if (!pattern.pattern().equals(other.pattern.pattern())) { return false; } if (pattern.flags() != other.pattern.flags()) { return false; } return true; } BrowserPattern(@Nonnegative final int id, @Nonnull final Pattern pattern, @Nonnegative final int position); @Override int compareTo(final BrowserPattern other); @Override boolean equals(final Object obj); @Override int getId(); @Override Pattern getPattern(); @Override int getPosition(); @Override int hashCode(); @Override String toString();  }