MCPcopy Create free account
hub / github.com/e2wugui/zeze / peekNode

Method peekNode

ZezeJava/ZezeJava/src/main/java/Zeze/Collections/Queue.java:237–247  ·  view source on GitHub ↗

@return 头节点,null if empty

()

Source from the content-addressed store, hash-verified

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 * 删除并返回头节点中的首个值

Callers

nothing calls this directly

Calls 4

getRootMethod · 0.95
getNodeMethod · 0.95
getHeadNodeKeyMethod · 0.65
getNodeIdMethod · 0.65

Tested by

no test coverage detected