insert_sorted


Description:

public void insert_sorted (owned G data, CompareDataFunc<G> func)

Inserts data into this using func to determine the new position.

Parameters:

this

a Queue

data

the data to insert

func

the CompareDataFunc used to compare elements in the queue. It is called with two elements of the this and user_data. It should return 0 if the elements are equal, a negative value if the first element comes before the second, and a positive value if the second element comes before the first.

user_data

user data passed to func