class StackInt
StackInt
. @abstract $DESCRIPTION$.
StackInt
. @abstract $DESCRIPTION.
Constants
- VERSION
Public Class Methods
initialize(data = nil). @abstract Constructor. @param [Data] data An initial data value or object. @return [Stack] A Stack, size 1.
# File lib/stack_ds_int.rb, line 18 def initialize(data = nil) end
Public Instance Methods
copy_constructor
(). @abstract Copy constructor. Creates a clean copy. self and the copy share no object references apart from Ruby's singleton methods. @return [Stack] A copy.
# File lib/stack_ds_int.rb, line 27 def copy_constructor() end
empty?(). @abstract Boolean method. @return [TrueClass, FalseClass] empty? True in the case the size is 0, and false otherwise.
# File lib/stack_ds_int.rb, line 43 def empty?() end
inspect(). @abstract Returns a diagrammatic String representing the Stack. @return [String] diagram
# File lib/stack_ds_int.rb, line 95 def inspect() end
pop(). @abstract Removes the top node. @return [Node] top The top Node's copy.
# File lib/stack_ds_int.rb, line 88 def pop() end
push(data). @abstract Pushes data on the stack. @param [Data] data A data object. The data becomes the stack top. @return [NilClass] nil
# File lib/stack_ds_int.rb, line 80 def push(data) end
size(). @abstract Getter. Gets self's size. @return [Integer] The size.
# File lib/stack_ds_int.rb, line 35 def size() end
top(). @abstract Getter. Gets the top node. @return [Node] copy The top Node's copy.
# File lib/stack_ds_int.rb, line 51 def top() end
Private Instance Methods
initialize_copy
(). @abstract Initializes self's copy. @return [Stack] copy self's copy reference.
# File lib/stack_ds_int.rb, line 105 def initialize_copy() end