@return 头节点,null if empty
()
| 235 | * @return 头节点,null if empty |
| 236 | */ |
| 237 | public BQueueNode peekNode() { |
| 238 | var root = getRoot(); |
| 239 | if (root == null) |
| 240 | return null; |
| 241 | |
| 242 | var headKey = root.getHeadNodeKey(); |
| 243 | if (headKey.getNodeId() == 0) |
| 244 | return null; |
| 245 | |
| 246 | return getNode(headKey); |
| 247 | } |
| 248 | |
| 249 | /** |
| 250 | * 删除并返回头节点中的首个值 |
nothing calls this directly
no test coverage detected