Interface CharStack
- All Known Implementing Classes:
AbstractCharBigList,AbstractCharBigList.CharRandomAccessSubList,AbstractCharBigList.CharSubList,AbstractCharList,AbstractCharList.CharRandomAccessSubList,AbstractCharList.CharSubList,AbstractCharStack,CharArrayList,CharArrayList.SubList,CharBigArrayBigList,CharBigLists.ListBigList,CharBigLists.Singleton,CharImmutableList,CharLists.Singleton,CharMappedBigList
-
Method Summary
Modifier and TypeMethodDescriptiondefault Characterpeek(int i) Deprecated.Please use the corresponding type-specific method instead.charpeekChar(int i) Peeks at an element on the stack (optional operation).default Characterpop()Deprecated.Please use the corresponding type-specific method instead.charpopChar()Pops the top off the stack.voidpush(char k) Pushes the given object on the stack.default voidDeprecated.Please use the corresponding type-specific method instead.default Charactertop()Deprecated.Please use the corresponding type-specific method instead.chartopChar()Peeks at the top of the stack (optional operation).
-
Method Details
-
push
void push(char k) Pushes the given object on the stack.- Parameters:
k- the object to push on the stack.- See Also:
-
popChar
char popChar()Pops the top off the stack.- Returns:
- the top of the stack.
- See Also:
-
topChar
char topChar()Peeks at the top of the stack (optional operation).- Returns:
- the top of the stack.
- See Also:
-
peekChar
char peekChar(int i) Peeks at an element on the stack (optional operation).- Parameters:
i- an index from the stop of the stack (0 represents the top).- Returns:
- the
i-th element on the stack. - See Also:
-
push
Deprecated.Please use the corresponding type-specific method instead.Pushes the given object on the stack.This default implementation delegates to the corresponding type-specific method.
-
pop
Deprecated.Please use the corresponding type-specific method instead.Pops the top off the stack.This default implementation delegates to the corresponding type-specific method.
-
top
Deprecated.Please use the corresponding type-specific method instead.Peeks at the top of the stack (optional operation).This default implementation returns
peek(0).This default implementation delegates to the corresponding type-specific method.
-
peek
Deprecated.Please use the corresponding type-specific method instead.Peeks at an element on the stack (optional operation).This default implementation just throws an
UnsupportedOperationException.This default implementation delegates to the corresponding type-specific method.
-