class LinkedListInt
LinkedListInt
. @abstract @class_description
A LinkedList data structure interface.
@attr base [NodeAdapter]
The list's base.
@attr size [Integer]
The list's element quantity.
LinkedListInt
. @abstract @class_description
A LinkedList data structure interface.
@attr base [NodeAdapter]
The list's base.
@attr size [Integer]
The list's element quantity.
Constants
- VERSION
Public Class Methods
initialize(d_or_n = nil). @description
Initializes a list instance.
@param d_or_n [DataType, Node, NodeAdapter]
A {https://docs.diligentsoftware.org/data#data-types DataType} type instance, Node, or NodeAdapter instance.
@return [LinkedList]
A LinkedList instance.
# File lib/linked_list_int.rb, line 24 def initialize(d_or_n = nil) end
Public Instance Methods
clone_df
(). @description
Deeply clones.
@return [LinkedList]
A deep clone. No Node references are identical. The data references are identical.
# File lib/linked_list_int.rb, line 41 def clone_df() end
empty(). @description
Predicate. Verifies size is 0
@return [TrueClass, FalseClass]
True in the case the size is zero. False otherwise.
# File lib/linked_list_int.rb, line 67 def empty() end
exists(n = nil). @description
Predicate. Verifies an object is a list element.
@param n [.]
Any object.
@return [TrueClass, FalseClass]
True in the case 'n' is a list element. False otherwise.
# File lib/linked_list_int.rb, line 59 def exists(n = nil) end
insert(n1 = nil, n2 = nil). @description
Inserts a Node after a specific Node.
@param n1 [Node, NodeAdapter]
A consequent. The insertion.
@param n2 [NodeAdapter]
A precession. An existing list Node.
@return [NilClass]
nil.
# File lib/linked_list_int.rb, line 102 def insert(n1 = nil, n2 = nil) end
remove(n = nil). @description
Removes the list's NodeAdapter 'n'.
@param n [NodeAdapter]
A list Node. The removal.
@return [NilClass]
nil.
@raise [ArgumentError]
In the case the argument was not found in the list.
# File lib/linked_list_int.rb, line 90 def remove(n = nil) end
shallow_clone
(). @description
Shallowly clones.
@return [LinkedList]
The clone.
# File lib/linked_list_int.rb, line 32 def shallow_clone() end
size(). @description
Gets the list's size.
@return [Integer]
The element quantity.
# File lib/linked_list_int.rb, line 49 def size() end
Protected Instance Methods
base(). @description
Gets base's reference.
@return [NodeAdapter]
'base'.
# File lib/linked_list_int.rb, line 112 def base() end
size=(i = nil). @description
Sets 'size'.
@param i [Integer]
An integer list size.
@return [Integer]
The argument.
# File lib/linked_list_int.rb, line 122 def size=(i = nil) end
Private Instance Methods
attach(n1 = nil, n2 = nil). @description
Attaches two NodeAdapters.
@param n1 [NodeAdapter]
A precession.
@param n2 [NodeAdapter]
A consequent.
@return [NilClass]
nil.
# File lib/linked_list_int.rb, line 170 def attach(n1 = nil, n2 = nil) end
base=(n = nil). @description
Sets 'base'.
@param n [NodeAdapter]
The instance becoming 'base'.
# File lib/linked_list_int.rb, line 142 def base=(n = nil) end
decrement_s
(). @description
Decrement operator. Decrements size.
@return [Integer]
The list's size less one.
# File lib/linked_list_int.rb, line 158 def decrement_s() end
detach(n1 = nil, n2 = nil). @description
Detaches two linked NodeAdapters.
@param n1 [NodeAdapter]
A precession.
@param n2 [NodeAdapter]
A consequent.
@return [NilClass]
nil.
# File lib/linked_list_int.rb, line 182 def detach(n1 = nil, n2 = nil) end
increment_s
(). @description
Increment operator. Increments size.
@return [Integer]
The list's size plus one.
# File lib/linked_list_int.rb, line 150 def increment_s() end
initialize_node
(dti = nil). @description
Initializes a NodeAdapter instance.
@param dti [DataType]
The NodeAdapter's data setting.
@return [NodeAdapter]
The NodeAdapter instance.
# File lib/linked_list_int.rb, line 134 def initialize_node(dti = nil) end