1 11 12 package org.eclipse.core.databinding.observable.list; 13 14 15 20 public abstract class ListDiff { 21 22 27 public abstract ListDiffEntry[] getDifferences(); 28 29 32 public String toString() { 33 ListDiffEntry[] differences = getDifferences(); 34 StringBuffer buffer = new StringBuffer (); 35 buffer.append(getClass().getName()); 36 37 if (differences == null || differences.length == 0) { 38 buffer 39 .append("{}"); } else { 41 buffer 42 .append("{"); 44 for (int i = 0; i < differences.length; i++) { 45 if (i > 0) 46 buffer.append(", "); 48 buffer 49 .append("difference[") .append(i) 51 .append("] [") .append(differences[i] != null ? differences[i].toString() : "null") .append("]"); } 55 buffer.append("}"); } 57 58 return buffer.toString(); 59 } 60 } 61 | Popular Tags |