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/04/17 17:52:21 UTC
cvs commit: xml-xalan/java/src/org/apache/xml/utils IntStack.java
sboag 01/04/17 08:52:21
Modified: java/src/org/apache/xml/utils Tag: DTM_EXP IntStack.java
Log:
Added peek(int n).
Revision Changes Path
No revision
No revision
1.3.2.1 +12 -0 xml-xalan/java/src/org/apache/xml/utils/IntStack.java
Index: IntStack.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xml/utils/IntStack.java,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -r1.3 -r1.3.2.1
--- IntStack.java 2001/01/02 03:42:50 1.3
+++ IntStack.java 2001/04/17 15:52:18 1.3.2.1
@@ -144,6 +144,18 @@
}
/**
+ * Looks at the object at the position the stack counting down n items.
+ *
+ * @param n The number of items down, indexed from zero.
+ * @return the object at n items down.
+ * @throws EmptyStackException if this stack is empty.
+ */
+ public int peek(int n)
+ {
+ return m_map[m_firstFree-(1+n)];
+ }
+
+ /**
* Sets an object at a the top of the statck
*
*
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org