Interface

Class: LinkedListIteratorInt.

Constants

Attributes

node

A LinkedList's Node reference.

position

An Integer list position. The first list position is zero. The position is at least zero and never greater than the list's size less one.

Method Signatures

initialize(l_n = nil)

def initialize(l_n = nil)
end

Initializes a LinkedListIterator instance. Takes a list Node argument. Returns the LinkedListIterator instance. The instance's node is the argument.

element()

def element()
end

Gets position's list element. Returns the Node reference.

position()

def position()
end

Gets the position. Returns the position Integer.

data()

def data()
end

Gets node's data. Returns the DataType data.

data=(dti = nil)

def data=(dti = nil)
end

Sets node's data. Takes a replacement DataType instance, dti. Sets node's data dti. Returns the argument.

===(inst = nil)

def ===(inst = nil)
end

Identity comparison operator. Compares the argument and self. Takes any instance argument, inst. Returns true in the case the instances are identical. false otherwise.

==(inst = nil)

def ==(inst = nil)
end

Equality operator. Compares the argument and self. Takes any instance argument, inst. Returns true in the case the instances are attributively equal. false otherwise. Attributive equality refers the instances' corresponding attribute references are 'eql?'.

next()

def next()
end

Increments position. Sets node the node's front reference.

prev()

def prev()
end

Decrements position. Sets node the node's back reference.

node_ref() protected

def node_ref()
end

Gets node's reference. Returns the Node reference.