Class: Concurrent::LockFreeStack::Node — Concurrent Ruby

# Class: Concurrent::LockFreeStack::Node

Inherits:
  Object
  - Object
  - Concurrent::LockFreeStack::Node
  show all

Defined in:
  lib/concurrent/collection/lock_free_stack.rb

## Instance Attribute Summary collapse

- #next_node ⇒ Node readonly
- #value ⇒ Object readonly

## Instance Method Summary collapse

- #initialize(value, next_node) ⇒ Node constructor

  A new instance of Node.

## Constructor Details

### #initialize(value, next_node) ⇒ `Node`

Returns a new instance of Node

    21
    22
    23
    24
    # File 'lib/concurrent/collection/lock_free_stack.rb', line 21

    def initialize(value, next_node)
      @value     = value
      @next_node = next_node
    end

## Instance Attribute Details

### #next_node ⇒ `Node` (readonly)

Returns:

- (`Node`)

    12
    13
    14
    # File 'lib/concurrent/collection/lock_free_stack.rb', line 12

    def next_node
      @next_node
    end

### #value ⇒ `Object`

Returns:

- (`Object`)

    15
    16
    17
    # File 'lib/concurrent/collection/lock_free_stack.rb', line 15

    def value
      @value
    end