func (rht *RHTPriorityQueueMap) Has(key string) bool {
	queue, ok := rht.nodeQueueMapByKey[key]
	if !ok {
		return false
	}
	node := queue.Peek().(*RHTPQMapNode)
	return node != nil && !node.isRemoved()
}
Has returns whether the element exists of the given key or not.
package json
import (
	"fmt"
	"sort"
	"strings"
	"github.com/yorkie-team/yorkie/internal/log"
	"github.com/yorkie-team/yorkie/pkg/document/time"
	"github.com/yorkie-team/yorkie/pkg/pq"
)
type RHTPQMapNode struct {
	key  string
	elem Element
}
func newRHTPQMapNode(key string, elem Element) *RHTPQMapNode {
	return &RHTPQMapNode{
		key:  key,
		elem: elem,
	}
}
func (n *RHTPQMapNode) Remove(removedAt *time.Ticket) bool {
	return n.elem.Remove(removedAt)
}
func (n *RHTPQMapNode) Less(other pq.Value) bool {
	node := other.(*RHTPQMapNode)
	return n.elem.CreatedAt().After(node.elem.CreatedAt())
}
func (n *RHTPQMapNode) isRemoved() bool {
	return n.elem.RemovedAt() != nil
}
func (n *RHTPQMapNode) Key() string {
	return n.key
}
func (n *RHTPQMapNode) Element() Element {
	return n.elem
}
type RHTPriorityQueueMap struct {
	nodeQueueMapByKey  map[string]*pq.PriorityQueue
	nodeMapByCreatedAt map[string]*RHTPQMapNode
}
func NewRHTPriorityQueueMap() *RHTPriorityQueueMap {
	return &RHTPriorityQueueMap{
		nodeQueueMapByKey:  make(map[string]*pq.PriorityQueue),
		nodeMapByCreatedAt: make(map[string]*RHTPQMapNode),
	}
}
func (rht *RHTPriorityQueueMap) Get(key string) Element {
	queue, ok := rht.nodeQueueMapByKey[key]
	if !ok || queue.Len() == 0 {
		return nil
	}
	node := queue.Peek().(*RHTPQMapNode)
	if node.isRemoved() {
		return nil
	}
	return node.elem
}