Permalink
Browse files

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

… isWhitespace
  • Loading branch information...
1 parent 95c4e24 commit ef261d1d82790bcca7536ce59a6ec70eb53650ed @rolfl rolfl committed Apr 1, 2012
@@ -538,7 +538,7 @@ public final boolean isCDATA() {
}
@Override
- public final boolean isAllWhiteSpace() {
+ public final boolean isAllWhitespace() {
return allwhite;
}
@@ -95,19 +95,19 @@ protected Walker buildWalker(final FormatStack fstack,
switch (fstack.getTextMode()) {
case PRESERVE:
- return new WalkPreserving(content);
+ return new WalkerPRESERVE(content);
case NORMALIZE:
- return new WalkCompacting(content, fstack, escape);
+ return new WalkerNORMALIZE(content, fstack, escape);
case TRIM:
- return new WalkTrimming(content, fstack, escape);
+ return new WalkerTRIM(content, fstack, escape);
case TRIM_FULL_WHITE:
- return new WalkTrimmingFullWhite(content, fstack, escape);
+ return new WalkerTRIM_FULL_WHITE(content, fstack, escape);
}
// all cases should be handled in the switch statement above. If someone
// creates a new TextMode though, then it will create a warning in
// eclipse above, and the code will fall through to this 'default' raw
// instance.
- return new WalkPreserving(content);
+ return new WalkerPRESERVE(content);
}
}
@@ -106,7 +106,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* values of these Text/CDATA members are all XML Whitespace.
* @return true
*/
- public abstract boolean isAllWhiteSpace();
+ public abstract boolean isAllWhitespace();
/**
* Behaves similarly to to a regular Iterator
@@ -65,15 +65,15 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* @author Rolf Lear
*
*/
-public class WalkCompacting extends AbstractFormattedWalker {
+public class WalkerNORMALIZE extends AbstractFormattedWalker {
/**
* Create the Trimmed walker instance.
* @param content The list of content to format
* @param fstack The current stack.
* @param escape Whether Text values should be escaped.
*/
- public WalkCompacting(final List<? extends Content> content,
+ public WalkerNORMALIZE(final List<? extends Content> content,
final FormatStack fstack, final boolean escape) {
super(content, fstack, escape);
}
@@ -68,7 +68,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* @author Rolf Lear
*
*/
-public class WalkPreserving implements Walker {
+public class WalkerPRESERVE implements Walker {
private int cursor = 0;
private final int size;
@@ -79,7 +79,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* Create a Walker that preserves all content in its raw state.
* @param content the content to walk.
*/
- public WalkPreserving(List<? extends Content> content) {
+ public WalkerPRESERVE(List<? extends Content> content) {
super();
size = content.size();
if (size == 0) {
@@ -132,7 +132,7 @@ public boolean isCDATA() {
}
@Override
- public boolean isAllWhiteSpace() {
+ public boolean isAllWhitespace() {
return size == 0;
}
@@ -66,15 +66,15 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* @author Rolf Lear
*
*/
-public class WalkTrimming extends AbstractFormattedWalker {
+public class WalkerTRIM extends AbstractFormattedWalker {
/**
* Create the Trimmed walker instance.
* @param content The list of content to format
* @param fstack The current stack.
* @param escape Whether Text values should be escaped.
*/
- public WalkTrimming(final List<? extends Content> content,
+ public WalkerTRIM(final List<? extends Content> content,
final FormatStack fstack, final boolean escape) {
super(content, fstack, escape);
}
@@ -66,15 +66,15 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* @author Rolf Lear
*
*/
-public class WalkTrimmingFullWhite extends AbstractFormattedWalker {
+public class WalkerTRIM_FULL_WHITE extends AbstractFormattedWalker {
/**
* Create the Trimmed walker instance.
* @param content The list of content to format
* @param fstack The current stack.
* @param escape Whether Text values should be escaped.
*/
- public WalkTrimmingFullWhite(final List<? extends Content> content,
+ public WalkerTRIM_FULL_WHITE(final List<? extends Content> content,
final FormatStack fstack, final boolean escape) {
super(content, fstack, escape);
}

0 comments on commit ef261d1

Please sign in to comment.