jess.xml
Class Indenter

java.lang.Object
  extended byjess.xml.Indenter

public class Indenter
extends java.lang.Object

A utility class that lets you easily compose formatted code.

(C) 2006 Sandia National Laboratories


Constructor Summary
Indenter()
           
 
Method Summary
 Indenter append(java.lang.Object o)
          Call toString on the argument, call append(String).
 Indenter append(java.lang.String s)
          Examine each character of the String, which may include multiple lines.
 Indenter appendln(java.lang.Object o)
          Call toString on the argument, call append(String), then append("\n");
 Indenter appendlnNoindent(java.lang.Object o)
          Call toString on the argument, call appendNoindent(String), then append("\n");
 Indenter appendNoindent(java.lang.Object o)
          Call toString on the argument, call appendNoindent(String).
 Indenter appendNoindent(java.lang.String s)
          Append the given string to the buffer with no translation at all.
 void clear()
          Erase the contents of this Indenter
 Indenter indent()
          Increase the indentation level by one.
 java.lang.String toString()
          Fetch the formatted contents.
 Indenter unindent()
          Decrease the indentation level by one.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Indenter

public Indenter()
Method Detail

clear

public void clear()
Erase the contents of this Indenter


indent

public Indenter indent()
Increase the indentation level by one.


unindent

public Indenter unindent()
Decrease the indentation level by one.


appendln

public Indenter appendln(java.lang.Object o)
Call toString on the argument, call append(String), then append("\n");


appendlnNoindent

public Indenter appendlnNoindent(java.lang.Object o)
Call toString on the argument, call appendNoindent(String), then append("\n");


append

public Indenter append(java.lang.Object o)
Call toString on the argument, call append(String).


appendNoindent

public Indenter appendNoindent(java.lang.Object o)
Call toString on the argument, call appendNoindent(String).


append

public Indenter append(java.lang.String s)
Examine each character of the String, which may include multiple lines. Accumulate lines, starting each one with a number of spaces dictated by the current indentation level.


appendNoindent

public Indenter appendNoindent(java.lang.String s)
Append the given string to the buffer with no translation at all.


toString

public java.lang.String toString()
Fetch the formatted contents.


© 2007 Sandia Corporation