| Modifier and Type | Field and Description |
|---|---|
| private int | m_allocatedSize
Array size allocated |
| private int | m_index
Index into the array of booleans |
| private boolean[] | m_values
Array of boolean values |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final void | |
| public Object | |
| private void | |
| public boolean | |
| public final boolean | Returns: the object at the top of this stack.Looks at the object at the top of this stack without removing it from the stack. |
| public final boolean | Returns: the object at the top of this stack.Looks at the object at the top of this stack without removing it from the stack. |
| public final boolean | Returns: the object at the top of this stack.Looks at the object at the top of this stack without removing it from the stack. |
| public final boolean | Returns: The object at the top of this stack.Removes the object at the top of this stack and returns that object as the value of this function. |
| public final boolean | Returns: Next object to the top or false if none thereRemoves the object at the top of this stack and returns the next object at the top as the value of this function. |
| public final boolean | Returns: theitem argument.the boolean to be pushed onto this stack. val)Pushes an item onto the top of this stack. |
| public final void | |
| public final int |
| m_allocatedSize | back to summary |
|---|---|
| private int m_allocatedSize Array size allocated | |
| m_index | back to summary |
|---|---|
| private int m_index Index into the array of booleans | |
| m_values | back to summary |
|---|---|
| private boolean[] m_values Array of boolean values | |
| BoolStack | back to summary |
|---|---|
| public BoolStack() Default constructor. Note that the default block size is very small, for small lists. | |
| BoolStack | back to summary |
|---|---|
| public BoolStack(int size) Construct a IntVector, using the given block size.
| |
| clear | back to summary |
|---|---|
| public final void clear() Clears the stack. | |
| clone | back to summary |
|---|---|
| public Object clone() throws CloneNotSupportedException Overrides java. Doc from java. Creates and returns a copy of this object. The precise meaning
of "copy" may depend on the class of the object. The general
intent is that, for any object will be true, and that the expression:x.clone() != x will bex.clone().getClass() == x.getClass() true, but these are not absolute requirements.
While it is typically the case that:
will bex.clone().equals(x) true, this is not an absolute requirement.
By convention, the returned object should be obtained by calling
By convention, the object returned by this method should be independent
of this object (which is being cloned). To achieve this independence,
it may be necessary to modify one or more fields of the object returned
by
| |
| grow | back to summary |
|---|---|
| private void grow() Grows the size of the stack | |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Tests if this stack is empty.
| |
| peek | back to summary |
|---|---|
| public final boolean peek() Looks at the object at the top of this stack without removing it from the stack.
| |
| peekOrFalse | back to summary |
|---|---|
| public final boolean peekOrFalse() Looks at the object at the top of this stack without removing it from the stack. If the stack is empty, it returns false.
| |
| peekOrTrue | back to summary |
|---|---|
| public final boolean peekOrTrue() Looks at the object at the top of this stack without removing it from the stack. If the stack is empty, it returns true.
| |
| pop | back to summary |
|---|---|
| public final boolean pop() Removes the object at the top of this stack and returns that object as the value of this function.
| |
| popAndTop | back to summary |
|---|---|
| public final boolean popAndTop() Removes the object at the top of this stack and returns the next object at the top as the value of this function.
| |
| push | back to summary |
|---|---|
| public final boolean push(boolean val) Pushes an item onto the top of this stack.
| |
| setTop | back to summary |
|---|---|
| public final void setTop(boolean b) Set the item at the top of this stack
| |
| size | back to summary |
|---|---|
| public final int size() Get the length of the list.
| |