Skip to content

Commit 19ca2d9

Browse files
committed
即将修改iterator
1 parent 3f7749d commit 19ca2d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

group17/1264835468/src/assignment/BinaryTree.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public BinaryTreeNode<T> deQueue() {
7777
throw new QueueIsEmptyException();
7878
}
7979

80-
public MyQueue<BinaryTreeNode<T>> getBFSNodeQueue() {
80+
public MyQueue<BinaryTreeNode<T>> getResult() {
8181
prepare();
8282
MyQueue<BinaryTreeNode<T>> result = new MyQueue<>();
8383
while (!isEmpty()) {
@@ -114,7 +114,7 @@ public Iterator<BinaryTreeNode<T>> iterator() {
114114
}
115115

116116
private class BFSIterator implements Iterator<BinaryTreeNode<T>> {
117-
MyQueue<BinaryTreeNode<T>> BFSQueue = new BFSNodeQueue().getBFSNodeQueue();
117+
MyQueue<BinaryTreeNode<T>> BFSQueue = new BFSNodeQueue().getResult();
118118

119119
@Override
120120
public boolean hasNext() {

0 commit comments

Comments
 (0)