From 1c0091b73c98691dc70cfd8f2fc0cd8e3b1afd03 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Thu, 4 Jun 2015 14:43:53 +0100 Subject: [PATCH] toString method added to aid viewing in the debugger --- src/jalview/util/MapList.java | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/jalview/util/MapList.java b/src/jalview/util/MapList.java index 2641659..662240e 100644 --- a/src/jalview/util/MapList.java +++ b/src/jalview/util/MapList.java @@ -859,4 +859,26 @@ public class MapList .getToHighest())); } } + + /** + * String representation - for debugging, not guaranteed not to change + */ + @Override + public String toString() + { + StringBuilder sb = new StringBuilder(64); + sb.append("From (").append(fromRatio).append(":").append(toRatio) + .append(") ["); + for (int[] shift : fromShifts) + { + sb.append(" ").append(Arrays.toString(shift)); + } + sb.append(" ] To ["); + for (int[] shift : toShifts) + { + sb.append(" ").append(Arrays.toString(shift)); + } + sb.append(" ]"); + return sb.toString(); + } } -- 1.7.10.2