Adds Add() method for Generic Priority queue.