public abstract class AbstractLongStack extends AbstractStack<java.lang.Long> implements LongStack
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 |
---|---|
java.lang.Long |
peek(int i)
Delegates to the corresponding type-specific method.
|
long |
peekLong(int i)
Delegates to the corresponding generic method.
|
java.lang.Long |
pop()
Delegates to the corresponding type-specific method.
|
long |
popLong()
Delegates to the corresponding generic method.
|
void |
push(long k)
Delegates to the corresponding generic method.
|
void |
push(java.lang.Long o)
Delegates to the corresponding type-specific method.
|
java.lang.Long |
top()
Delegates to the corresponding type-specific method.
|
long |
topLong()
Delegates to the corresponding generic method.
|
public void push(java.lang.Long o)
public java.lang.Long pop()
public java.lang.Long top()
top
in interface Stack<java.lang.Long>
top
in class AbstractStack<java.lang.Long>
public java.lang.Long peek(int i)
peek
in interface Stack<java.lang.Long>
peek
in class AbstractStack<java.lang.Long>
i
- an index from the stop of the stack (0 represents the top).i
-th element on the stack.public void push(long k)
push
in interface LongStack
Stack.push(Object)
public long popLong()
popLong
in interface LongStack
Stack.pop()
public long topLong()
topLong
in interface LongStack
Stack.top()
public long peekLong(int i)
peekLong
in interface LongStack
Stack.peek(int)