Class: Algorithmix::DataStructure::Generic::LinkedList::Node
- Inherits:
-
Object
- Object
- Algorithmix::DataStructure::Generic::LinkedList::Node
- Defined in:
- lib/algorithmix/data_structure/generic/linked_list.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#next_node ⇒ Object
readonly
Returns the value of attribute next_node.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value = nil, next_node = nil, id = nil) ⇒ Node
constructor
A new instance of Node.
Constructor Details
#initialize(value = nil, next_node = nil, id = nil) ⇒ Node
Returns a new instance of Node.
425 426 427 428 429 |
# File 'lib/algorithmix/data_structure/generic/linked_list.rb', line 425 def initialize(value = nil, next_node = nil, id = nil) @value = value @next_node = next_node @id = id end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
422 423 424 |
# File 'lib/algorithmix/data_structure/generic/linked_list.rb', line 422 def id @id end |
#next_node ⇒ Object
Returns the value of attribute next_node.
423 424 425 |
# File 'lib/algorithmix/data_structure/generic/linked_list.rb', line 423 def next_node @next_node end |
#value ⇒ Object
Returns the value of attribute value.
423 424 425 |
# File 'lib/algorithmix/data_structure/generic/linked_list.rb', line 423 def value @value end |