Interface

Class: NodeAdapterInt.

Constants

Attributes

back, undeclared

A backward reference. Either a Node or a NilClass instance.

data, undeclared

A DataType type instance reference.

front, undeclared

A forward reference. Either a Node or a NilClass instance.

Method Signatures

initialize(n = nil)

def initialize(n = nil)
end

Initializes a NodeAdapter. Takes an argument Node, n. Sets back, data, and front n's back, data, and front. Returns a NodeAdapter instance. In the case n is not a Node instance, raises an ArgumentError.

back()

def back()
end

Gets back's reference. Returns the Node or NilClass instance reference.

front()

def front()
end

Gets front's reference. Returns the Node or NilClass instance reference.

attach_back(n = nil)

def attach_back(n = nil)
end

Attaches back a Node. Takes a Node argument, n. n becomes back's setting. Returns nil.

attach_front(n = nil)

def attach_front(n = nil)
end

Attaches front the argument Node. Takes an argument Node, n. n becomes front's setting. Returns nil.

detach_back()

def detach_back()
end

Sets back nil. Returns nil.

detach_front()

def detach_front()
end

Sets front nil. Returns nil.

back=(n = nil) private

def back=(n = nil)
end

Sets back's reference. Takes an argument Node or NilClass instance, n. n becomes back's setting. Returns the argument. Raises an ArgumentError in the case n is any type other than Node or NilClass.

front=(n = nil) private

def front=(n = nil)
end

Sets front's reference. Takes an argument Node or NilClass instance, n. n becomes front's setting. Returns the argument. Raises an ArgumentError in the case n is any type other than Node or NilClass.