/*
* reserved comment block
* DO NOT REMOVE OR ALTER!
*/
/*
* Copyright 2000-2002,2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* A simple integer based stack.
*
* moved to com.sun.org.apache.xerces.internal.util by neilg to support the
* XPathMatcher.
* @author Andy Clark, IBM
*
*/
public final class IntStack {
//
// Data
//
/** Stack depth. */
private int fDepth;
/** Stack data. */
private int[] fData;
//
// Public methods
//
/** Returns the size of the stack. */
public int size() {
return fDepth;
}
/** Pushes a value onto the stack. */
}
/** Peeks at the top of the stack. */
public int peek() {
}
/** Returns the element at the specified depth in the stack. */
}
/** Pops a value off of the stack. */
public int pop() {
}
/** Clears the stack. */
public void clear() {
fDepth = 0;
}
// debugging
/** Prints the stack. */
public void print() {
for (int i = 0; i < fDepth; i++) {
if (i == 3) {
break;
}
if (i < fDepth - 1) {
}
}
}
//
// Private methods
//
/** Ensures capacity. */
fData = new int[32];
}
}
}
} // class IntStack