1 11 12 package org.eclipse.jface.internal.databinding.provisional.observable.list; 13 14 import org.eclipse.jface.internal.databinding.provisional.observable.IDiff; 15 16 21 public abstract class ListDiff implements IDiff { 22 23 28 public abstract ListDiffEntry[] getDifferences(); 29 30 33 public String toString() { 34 ListDiffEntry[] differences = getDifferences(); 35 StringBuffer buffer = new StringBuffer (); 36 buffer.append(getClass().getName()); 37 38 if (differences == null || differences.length == 0) { 39 buffer 40 .append("{}"); } else { 42 buffer 43 .append("{"); 45 for (int i = 0; i < differences.length; i++) { 46 if (i > 0) 47 buffer.append(", "); 49 buffer 50 .append("difference[") .append(i) 52 .append("] [") .append(differences[i] != null ? differences[i].toString() : "null") .append("]"); } 56 buffer.append("}"); } 58 59 return buffer.toString(); 60 } 61 } 62 | Popular Tags |