find method
按条件查找节点
Implementation
N? find(bool Function(N element) test) {
var currentNode = _first;
while (currentNode != null) {
if (test(currentNode)) return currentNode;
currentNode = currentNode.next;
}
return null;
}
按条件查找节点
N? find(bool Function(N element) test) {
var currentNode = _first;
while (currentNode != null) {
if (test(currentNode)) return currentNode;
currentNode = currentNode.next;
}
return null;
}