From df9dbddd378e6f5adadb3b62279fb80eb92b4a91 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 7 May 2014 17:57:06 -0400 Subject: core: Change Priority.toString() to use more natural language. --- .../src/main/java/com/tavianator/sangria/core/Priority.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'sangria-core/src/main/java/com') diff --git a/sangria-core/src/main/java/com/tavianator/sangria/core/Priority.java b/sangria-core/src/main/java/com/tavianator/sangria/core/Priority.java index 6e6a2ea..a833883 100644 --- a/sangria-core/src/main/java/com/tavianator/sangria/core/Priority.java +++ b/sangria-core/src/main/java/com/tavianator/sangria/core/Priority.java @@ -126,23 +126,22 @@ public class Priority implements Comparable { @Override public String toString() { - StringBuilder builder = new StringBuilder("Priority."); + StringBuilder builder = new StringBuilder(); if (weights.length == 0) { - builder.append("getDefault()"); + builder.append("default priority"); } else { - builder.append("create("); + builder.append("priority ["); for (int i = 0; i < weights.length; ++i) { if (i != 0) { builder.append(", "); } builder.append(weights[i]); } - builder.append(")"); + builder.append("]"); } if (seq != 0) { - builder.append(".next(") - .append(seq) - .append(")"); + builder.append(" + ") + .append(seq); } return builder.toString(); } -- cgit v1.2.3