class Concurrent::Collection::RubyNonConcurrentPriorityQueue

def swap(x, y)

Parameters:
  • y (Integer) -- the second index to swap
  • x (Integer) -- the first index to swap
def swap(x, y)
  temp = @queue[x]
  @queue[x] = @queue[y]
  @queue[y] = temp
end