You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by sb...@apache.org on 2001/06/03 05:02:28 UTC
cvs commit: xml-xalan/java/src/org/apache/xml/utils BoolStack.java
sboag 01/06/02 20:02:28
Modified: java/src/org/apache/xml/utils Tag: DTM_EXP BoolStack.java
Log:
Added peekOrTrue method.
Revision Changes Path
No revision
No revision
1.4.2.1 +11 -0 xml-xalan/java/src/org/apache/xml/utils/BoolStack.java
Index: BoolStack.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xml/utils/BoolStack.java,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -r1.4 -r1.4.2.1
--- BoolStack.java 2001/03/28 04:41:06 1.4
+++ BoolStack.java 2001/06/03 03:02:27 1.4.2.1
@@ -184,6 +184,17 @@
}
/**
+ * Looks at the object at the top of this stack without removing it
+ * from the stack. If the stack is empty, it returns true.
+ *
+ * @return the object at the top of this stack.
+ */
+ public final boolean peekOrTrue()
+ {
+ return (m_index > -1) ? m_values[m_index] : true;
+ }
+
+ /**
* Tests if this stack is empty.
*
* @return <code>true</code> if this stack is empty;
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org