I’m not sure what PriorityGenerator was when creating the UnboundedPriorityMailbox in that blog, but it’s just a Comparator in passed to the mailbox constructor.
So make a comparator, create the mailbox implementation and follow the rest of the steps for configuration.