class WirisPlugin::Queue
Attributes
array[RW]
size[RW]
Public Class Methods
new()
click to toggle source
Calls superclass method
# File lib/com/wiris/util/type/Queue.rb, line 8 def initialize() super() self.array = Array.new() self.size = 0 end
Public Instance Methods
empty()
click to toggle source
# File lib/com/wiris/util/type/Queue.rb, line 26 def empty() return @size == 0 end
front()
click to toggle source
# File lib/com/wiris/util/type/Queue.rb, line 13 def front() return @array::_(0) end
pop()
click to toggle source
# File lib/com/wiris/util/type/Queue.rb, line 16 def pop() if @size > 0 @size-=1 @array::splice(0,1) end end
push(e)
click to toggle source
# File lib/com/wiris/util/type/Queue.rb, line 22 def push(e) @array::push(e) @size+=1 end