1 4 package com.tc.util.diff; 5 6 import com.tc.util.Assert; 7 8 11 public abstract class Difference { 12 13 private final DifferenceContext where; 14 15 public Difference(DifferenceContext where) { 16 Assert.assertNotNull(where); 17 this.where = where; 18 } 19 20 public DifferenceContext where() { 21 return this.where; 22 } 23 24 public abstract Object a(); 25 public abstract Object b(); 26 public abstract String toString(); 27 28 public boolean equals(Object that) { 29 if (! (that instanceof Difference)) return false; 30 31 Difference diffThat = (Difference) that; 32 33 return this.where.rawEquals(diffThat.where); 34 } 35 36 } | Popular Tags |