BoolStack.java revision 286
286N/A * reserved comment block 286N/A * DO NOT REMOVE OR ALTER! 286N/A * Copyright 1999-2004 The Apache Software Foundation. 286N/A * Licensed under the Apache License, Version 2.0 (the "License"); 286N/A * you may not use this file except in compliance with the License. 286N/A * You may obtain a copy of the License at 286N/A * Unless required by applicable law or agreed to in writing, software 286N/A * distributed under the License is distributed on an "AS IS" BASIS, 286N/A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 286N/A * See the License for the specific language governing permissions and 286N/A * limitations under the License. 286N/A * Simple stack for boolean values. 286N/A * It exists to cut the serializers dependancy on that package. 286N/A * A minor changes from that package are: 286N/A * doesn't implement Clonable 286N/A * This class is not a public API, it is only public because it is 286N/A /** Array of boolean values */ 286N/A /** Array size allocated */ 286N/A /** Index into the array of booleans */ 286N/A * Default constructor. Note that the default 286N/A * block size is very small, for small lists. 286N/A * Construct a IntVector, using the given block size. 286N/A * @param size array size to allocate 286N/A * Get the length of the list. 286N/A * @return Current length of the list 286N/A * Pushes an item onto the top of this stack. 286N/A * @param val the boolean to be pushed onto this stack. 286N/A * @return the <code>item</code> argument. 286N/A * Removes the object at the top of this stack and returns that 286N/A * object as the value of this function. 286N/A * @return The object at the top of this stack. 286N/A * @throws EmptyStackException if this stack is empty. 286N/A * Removes the object at the top of this stack and returns the 286N/A * next object at the top as the value of this function. 286N/A * @return Next object to the top or false if none there 286N/A * Set the item at the top of this stack 286N/A * @param b Object to set at the top of this stack 286N/A * Looks at the object at the top of this stack without removing it 286N/A * @return the object at the top of this stack. 286N/A * @throws EmptyStackException if this stack is empty. 286N/A * Looks at the object at the top of this stack without removing it 286N/A * from the stack. If the stack is empty, it returns false. 286N/A * @return the object at the top of this stack. 286N/A * Looks at the object at the top of this stack without removing it 286N/A * from the stack. If the stack is empty, it returns true. 286N/A * @return the object at the top of this stack. 286N/A * Tests if this stack is empty. 286N/A * @return <code>true</code> if this stack is empty; 286N/A * <code>false</code> otherwise. 286N/A * Grows the size of the stack