diff src/org/tmatesoft/hg/internal/IntSliceSeq.java @ 679:19f5167c2155

HgParentChildMap: deduce common ancestor functionality
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Sat, 20 Jul 2013 17:40:52 +0200
parents cce0387c6041
children 58a6900f845d
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/internal/IntSliceSeq.java	Fri Jul 19 15:36:29 2013 +0200
+++ b/src/org/tmatesoft/hg/internal/IntSliceSeq.java	Sat Jul 20 17:40:52 2013 +0200
@@ -101,6 +101,22 @@
 			}
 		};
 	}
+	
+	@Override
+	public String toString() {
+		StringBuilder sb = new StringBuilder();
+		for (int i = 0; i < size(); i++) {
+			sb.append('(');
+			for (int j = 0; j < slice; j++) {
+				sb.append(slices.get(i*slice + j));
+				sb.append(',');
+			}
+			sb.setLength(sb.length() - 1);
+			sb.append(')');
+			sb.append(' ');
+		}
+		return sb.toString();
+	}
 
 	private void checkArgRange(int rangeSize, int index) {
 		if (index >= 0 && index < rangeSize) {