From: gmungoc Date: Thu, 4 Jun 2015 13:43:53 +0000 (+0100) Subject: toString method added to aid viewing in the debugger X-Git-Tag: Release_2_10_0~632 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=1c0091b73c98691dc70cfd8f2fc0cd8e3b1afd03;p=jalview.git toString method added to aid viewing in the debugger --- 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(); + } }