@Test public void testNotEquals3() { PendingToken instance1 = new PendingToken("", 0, 0); PendingToken instance2 = new PendingToken("a", 0, 0); boolean result = instance1.equals(instance2); assertFalse("PendingToken equals() only 2 immutables match", result); }
@Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof PendingToken)) { return false; } PendingToken other = (PendingToken) o; return start == other.start && end == other.end && str.equals(other.str); }
PendingToken { @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof PendingToken)) { return false; } PendingToken other = (PendingToken) o; return start == other.start && end == other.end && str.equals(other.str); } }
PendingToken { @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof PendingToken)) { return false; } PendingToken other = (PendingToken) o; return start == other.start && end == other.end && str.equals(other.str); } PendingToken(String str, int start, int end); }
PendingToken { @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof PendingToken)) { return false; } PendingToken other = (PendingToken) o; return start == other.start && end == other.end && str.equals(other.str); } PendingToken(String str, int start, int end); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
PendingToken { @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof PendingToken)) { return false; } PendingToken other = (PendingToken) o; return start == other.start && end == other.end && str.equals(other.str); } PendingToken(String str, int start, int end); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); final String str; final int start; final int end; public boolean nonpos; }