data_structures module

class amulet.api.data_structures.Stack(initial_data=None)[source]

Bases: typing.Generic

Implementation of a Stack, but prevents out-of-order editing of stored data


Clears all stored elements in the Stack


Checks if the Stack is empty

Return type:bool
Returns:True is the Stack holds elements, False otherwise

Returns the top element of the Stack without removing it

Return type:Optional[~T]
Returns:The top element of the Stack, None if the Stack is empty