java.lang.Cloneable
public final class BoolStack
extends java.lang.Object
implements java.lang.Cloneable
Constructor | Description |
---|---|
BoolStack() |
Default constructor.
|
BoolStack(int size) |
Construct a IntVector, using the given block size.
|
Modifier and Type | Method | Description |
---|---|---|
void |
clear() |
Clears the stack.
|
java.lang.Object |
clone() |
|
boolean |
isEmpty() |
Tests if this stack is empty.
|
boolean |
peek() |
Looks at the object at the top of this stack without removing it
from the stack.
|
boolean |
peekOrFalse() |
Looks at the object at the top of this stack without removing it
from the stack.
|
boolean |
peekOrTrue() |
Looks at the object at the top of this stack without removing it
from the stack.
|
boolean |
pop() |
Removes the object at the top of this stack and returns that
object as the value of this function.
|
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.
|
boolean |
push(boolean val) |
Pushes an item onto the top of this stack.
|
void |
setTop(boolean b) |
Set the item at the top of this stack
|
int |
size() |
Get the length of the list.
|
public BoolStack()
public BoolStack(int size)
size
- array size to allocatepublic final int size()
public final void clear()
public final boolean push(boolean val)
val
- the boolean to be pushed onto this stack.item
argument.public final boolean pop()
EmptyStackException
- if this stack is empty.public final boolean popAndTop()
public final void setTop(boolean b)
b
- Object to set at the top of this stackpublic final boolean peek()
EmptyStackException
- if this stack is empty.public final boolean peekOrFalse()
public final boolean peekOrTrue()
public boolean isEmpty()
true
if this stack is empty;
false
otherwise.public java.lang.Object clone() throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
Copyright © 2014 Apache XML Project. All Rights Reserved.