Package it.unimi.dsi.fastutil.bytes
Interface ByteStack
-
- All Known Implementing Classes:
AbstractByteBigList,AbstractByteBigList.ByteSubList,AbstractByteList,AbstractByteList.ByteSubList,AbstractByteStack,ByteArrayList,ByteBigArrayBigList,ByteBigLists.ListBigList,ByteBigLists.Singleton,ByteLists.Singleton
public interface ByteStack extends Stack<Byte>
A type-specificStack; provides some additional methods that use polymorphism to avoid (un)boxing.
-
-
Method Summary
Modifier and Type Method Description default Bytepeek(int i)Deprecated.Please use the corresponding type-specific method instead.bytepeekByte(int i)Peeks at an element on the stack (optional operation).default Bytepop()Deprecated.Please use the corresponding type-specific method instead.bytepopByte()Pops the top off the stack.voidpush(byte k)Pushes the given object on the stack.default voidpush(Byte o)Deprecated.Please use the corresponding type-specific method instead.default Bytetop()Deprecated.Please use the corresponding type-specific method instead.bytetopByte()Peeks at the top of the stack (optional operation).
-
-
-
Method Detail
-
push
void push(byte k)
Pushes the given object on the stack.- Parameters:
k- the object to push on the stack.- See Also:
Stack.push(Object)
-
popByte
byte popByte()
Pops the top off the stack.- Returns:
- the top of the stack.
- See Also:
Stack.pop()
-
topByte
byte topByte()
Peeks at the top of the stack (optional operation).- Returns:
- the top of the stack.
- See Also:
Stack.top()
-
peekByte
byte peekByte(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:
Stack.peek(int)
-
push
@Deprecated default void push(Byte o)
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 default Byte 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 default Byte 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 default Byte peek(int i)
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.
-
-