Skip to content
This repository
Browse code

Rename Walkers to match Format TextMode names, change isWhiteSpace to…

… isWhitespace
  • Loading branch information...
commit ef261d1d82790bcca7536ce59a6ec70eb53650ed 1 parent 95c4e24
Rolf authored April 01, 2012
2  core/src/java/org/jdom2/output/support/AbstractFormattedWalker.java
@@ -538,7 +538,7 @@ public final boolean isCDATA() {
538 538
 	}
539 539
 
540 540
 	@Override
541  
-	public final boolean isAllWhiteSpace() {
  541
+	public final boolean isAllWhitespace() {
542 542
 		return allwhite;
543 543
 	}
544 544
 
10  core/src/java/org/jdom2/output/support/AbstractOutputProcessor.java
@@ -95,19 +95,19 @@ protected Walker buildWalker(final FormatStack fstack,
95 95
 		
96 96
 		switch (fstack.getTextMode()) {
97 97
 			case PRESERVE:
98  
-				return new WalkPreserving(content);
  98
+				return new WalkerPRESERVE(content);
99 99
 			case NORMALIZE:
100  
-				return new WalkCompacting(content, fstack, escape);
  100
+				return new WalkerNORMALIZE(content, fstack, escape);
101 101
 			case TRIM:
102  
-				return new WalkTrimming(content, fstack, escape);
  102
+				return new WalkerTRIM(content, fstack, escape);
103 103
 			case TRIM_FULL_WHITE:
104  
-				return new WalkTrimmingFullWhite(content, fstack, escape);
  104
+				return new WalkerTRIM_FULL_WHITE(content, fstack, escape);
105 105
 		}
106 106
 		// all cases should be handled in the switch statement above. If someone
107 107
 		// creates a new TextMode though, then it will create a warning in
108 108
 		// eclipse above, and the code will fall through to this 'default' raw
109 109
 		// instance.
110  
-		return new WalkPreserving(content);
  110
+		return new WalkerPRESERVE(content);
111 111
 	}
112 112
 
113 113
 }
2  core/src/java/org/jdom2/output/support/Walker.java
@@ -106,7 +106,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
106 106
 	 * values of these Text/CDATA members are all XML Whitespace.
107 107
 	 * @return true 
108 108
 	 */
109  
-	public abstract boolean isAllWhiteSpace();
  109
+	public abstract boolean isAllWhitespace();
110 110
 
111 111
 	/**
112 112
 	 * Behaves similarly to to a regular Iterator
4  ...java/org/jdom2/output/support/WalkCompacting.java → ...ava/org/jdom2/output/support/WalkerNORMALIZE.java
@@ -65,7 +65,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
65 65
  * @author Rolf Lear
66 66
  *
67 67
  */
68  
-public class WalkCompacting extends AbstractFormattedWalker {
  68
+public class WalkerNORMALIZE extends AbstractFormattedWalker {
69 69
 
70 70
 	/**
71 71
 	 * Create the Trimmed walker instance.
@@ -73,7 +73,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
73 73
 	 * @param fstack The current stack.
74 74
 	 * @param escape Whether Text values should be escaped.
75 75
 	 */
76  
-	public WalkCompacting(final List<? extends Content> content, 
  76
+	public WalkerNORMALIZE(final List<? extends Content> content, 
77 77
 			final FormatStack fstack, final boolean escape) {
78 78
 		super(content, fstack, escape);
79 79
 	}
6  ...java/org/jdom2/output/support/WalkPreserving.java → ...java/org/jdom2/output/support/WalkerPRESERVE.java
@@ -68,7 +68,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
68 68
  * @author Rolf Lear
69 69
  *
70 70
  */
71  
-public class WalkPreserving implements Walker {
  71
+public class WalkerPRESERVE implements Walker {
72 72
 	
73 73
 	private int cursor = 0;
74 74
 	private final int size;
@@ -79,7 +79,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
79 79
 	 * Create a Walker that preserves all content in its raw state.
80 80
 	 * @param content the content to walk.
81 81
 	 */
82  
-	public WalkPreserving(List<? extends Content> content) {
  82
+	public WalkerPRESERVE(List<? extends Content> content) {
83 83
 		super();
84 84
 		size = content.size();
85 85
 		if (size == 0) {
@@ -132,7 +132,7 @@ public boolean isCDATA() {
132 132
 	}
133 133
 
134 134
 	@Override
135  
-	public boolean isAllWhiteSpace() {
  135
+	public boolean isAllWhitespace() {
136 136
 		return size == 0;
137 137
 	}
138 138
 
4  ...c/java/org/jdom2/output/support/WalkTrimming.java → ...src/java/org/jdom2/output/support/WalkerTRIM.java
@@ -66,7 +66,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
66 66
  * @author Rolf Lear
67 67
  *
68 68
  */
69  
-public class WalkTrimming extends AbstractFormattedWalker {
  69
+public class WalkerTRIM extends AbstractFormattedWalker {
70 70
 
71 71
 	/**
72 72
 	 * Create the Trimmed walker instance.
@@ -74,7 +74,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
74 74
 	 * @param fstack The current stack.
75 75
 	 * @param escape Whether Text values should be escaped.
76 76
 	 */
77  
-	public WalkTrimming(final List<? extends Content> content, 
  77
+	public WalkerTRIM(final List<? extends Content> content, 
78 78
 			final FormatStack fstack, final boolean escape) {
79 79
 		super(content, fstack, escape);
80 80
 	}
4  ...g/jdom2/output/support/WalkTrimmingFullWhite.java → ...g/jdom2/output/support/WalkerTRIM_FULL_WHITE.java
@@ -66,7 +66,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
66 66
  * @author Rolf Lear
67 67
  *
68 68
  */
69  
-public class WalkTrimmingFullWhite extends AbstractFormattedWalker {
  69
+public class WalkerTRIM_FULL_WHITE extends AbstractFormattedWalker {
70 70
 
71 71
 	/**
72 72
 	 * Create the Trimmed walker instance.
@@ -74,7 +74,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
74 74
 	 * @param fstack The current stack.
75 75
 	 * @param escape Whether Text values should be escaped.
76 76
 	 */
77  
-	public WalkTrimmingFullWhite(final List<? extends Content> content, 
  77
+	public WalkerTRIM_FULL_WHITE(final List<? extends Content> content, 
78 78
 			final FormatStack fstack, final boolean escape) {
79 79
 		super(content, fstack, escape);
80 80
 	}

0 notes on commit ef261d1

Please sign in to comment.
Something went wrong with that request. Please try again.