public abstract class AbstractDoubleStack extends AbstractStack<Double> implements DoubleStack
To create a type-specific stack, you need both object methods and primitive-type methods. However, if you inherit from this class you need just one (anyone).
| Modifier and Type | Method and Description |
|---|---|
Double |
peek(int i)
Deprecated.
Please use the corresponding type-specific method instead.
|
double |
peekDouble(int i)
Peeks at an element on the stack (optional operation).
|
Double |
pop()
Deprecated.
Please use the corresponding type-specific method instead.
|
double |
popDouble()
Pushes the given object on the stack.
|
void |
push(double k)
Pushes the given object on the stack.
|
void |
push(Double o)
Deprecated.
Please use the corresponding type-specific method instead.
|
Double |
top()
Deprecated.
Please use the corresponding type-specific method instead.
|
double |
topDouble()
Peeks at the top of the stack (optional operation).
|
public void push(double k)
This implementation delegates to the corresponding generic method.
push in interface DoubleStackStack.push(Object)public double popDouble()
This implementation delegates to the corresponding generic method.
popDouble in interface DoubleStackStack.pop()public double topDouble()
This implementation delegates to the corresponding generic method.
topDouble in interface DoubleStackStack.top()public double peekDouble(int i)
This implementation delegates to the corresponding generic method.
peekDouble in interface DoubleStackStack.peek(int)@Deprecated public void push(Double o)
This implementation delegates to the corresponding type-specific method.
push in interface DoubleStackpush in interface Stack<Double>o - the object that will become the new top of the stack.@Deprecated public Double pop()
This implementation delegates to the corresponding type-specific method.
pop in interface DoubleStackpop in interface Stack<Double>@Deprecated public Double top()
This implementation delegates to the corresponding type-specific method.
top in interface DoubleStacktop in interface Stack<Double>top in class AbstractStack<Double>@Deprecated public Double peek(int i)
This implementation just throws an UnsupportedOperationException.
This implementation delegates to the corresponding type-specific method.
peek in interface DoubleStackpeek in interface Stack<Double>peek in class AbstractStack<Double>i - an index from the stop of the stack (0 represents the top).i-th element on the stack.