dlr 2004/05/05 16:23:51
Modified: src/java/org/apache/velocity/tools/generic Alternator.java
Log:
* src/java/org/apache/velocity/tools/generic/Alternator.java
Switched the default state of "auto" from false to true.
Highlighted this in the JavaDoc.
Revision Changes Path
1.4 +16 -16
jakarta-velocity-tools/src/java/org/apache/velocity/tools/generic/Alternator.java
Index: Alternator.java
===================================================================
RCS file:
/home/cvs/jakarta-velocity-tools/src/java/org/apache/velocity/tools/generic/Alternator.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -u -r1.3 -r1.4
--- Alternator.java 5 May 2004 20:57:46 -0000 1.3
+++ Alternator.java 5 May 2004 23:23:51 -0000 1.4
@@ -61,15 +61,24 @@
{
private Object[] list;
private int index = 0;
- private boolean auto = false;
+ private boolean auto = true;
/**
* Creates a new Alternator for the specified list. Alternation
- * is set to explicit (e.g. it's not automatic).
+ * defaults to automatic.
+ */
+ public Alternator(List list)
+ {
+ this(true, list);
+ }
+
+ /**
+ * Creates a new Alternator for the specified list. Alternation
+ * defaults to automatic.
*/
public Alternator(Object[] list)
{
- this(false, list);
+ this(true, list);
}
/**
@@ -86,15 +95,6 @@
}
/**
- * Creates a new Alternator for the specified list. Alternation
- * is set to explicit (e.g. it's not automatic).
- */
- public Alternator(List list)
- {
- this(false, list);
- }
-
- /**
* Creates a new Alternator for the specified list with the specified
* automatic shifting preference.
*
@@ -155,9 +155,9 @@
/**
* Returns a string representation of the current item or
- * <code>null</code> if the current item is null. Also,
- * if <i>auto</i> is true, this will shift after returning
- * the current item.
+ * <code>null</code> if the current item is null. <b>If
+ * <i>auto</i> is true, this will shift after returning the
+ * current item</b>.
*/
public String toString()
{
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]