mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
Improved consistency of method names.
This commit is contained in:
parent
2b3ab14082
commit
d16d496bd9
2 changed files with 14 additions and 12 deletions
|
@ -539,7 +539,7 @@ public class BTree {
|
||||||
if (node == 0) {
|
if (node == 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
visitor.preNode(node);
|
visitor.preVisit(node);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Chunk chunk = db.getChunk(node);
|
Chunk chunk = db.getChunk(node);
|
||||||
|
@ -585,7 +585,7 @@ public class BTree {
|
||||||
}
|
}
|
||||||
return accept(getChild(chunk, node, i), visitor);
|
return accept(getChild(chunk, node, i), visitor);
|
||||||
} finally {
|
} finally {
|
||||||
visitor.postNode(node);
|
visitor.postVisit(node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -614,14 +614,14 @@ public class BTree {
|
||||||
public String getMsg() { return msg; }
|
public String getMsg() { return msg; }
|
||||||
public boolean isValid() { return valid; }
|
public boolean isValid() { return valid; }
|
||||||
@Override
|
@Override
|
||||||
public void postNode(long node) throws CoreException { depth--; }
|
public void postVisit(long node) throws CoreException { depth--; }
|
||||||
@Override
|
@Override
|
||||||
public int compare(long record) throws CoreException { return 0; }
|
public int compare(long record) throws CoreException { return 0; }
|
||||||
@Override
|
@Override
|
||||||
public boolean visit(long record) throws CoreException { return true; }
|
public boolean visit(long record) throws CoreException { return true; }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void preNode(long node) throws CoreException {
|
public void preVisit(long node) throws CoreException {
|
||||||
depth++;
|
depth++;
|
||||||
|
|
||||||
// Collect information for checking.
|
// Collect information for checking.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2005, 2015 QNX Software Systems and others.
|
* Copyright (c) 2005, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -8,6 +8,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* QNX - Initial API and implementation
|
* QNX - Initial API and implementation
|
||||||
* Markus Schorn (Wind River Systems)
|
* Markus Schorn (Wind River Systems)
|
||||||
|
* Sergey Prigogin (Google)
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.core.pdom.db;
|
package org.eclipse.cdt.internal.core.pdom.db;
|
||||||
|
|
||||||
|
@ -24,7 +25,7 @@ public interface IBTreeVisitor {
|
||||||
* compatible with the one used for the B-tree.
|
* compatible with the one used for the B-tree.
|
||||||
* Used for visiting.
|
* Used for visiting.
|
||||||
*
|
*
|
||||||
* @param record
|
* @param record the offset of the record to compare with the key
|
||||||
* @return -1 if record < key, 0 if record == key, 1 if record > key
|
* @return -1 if record < key, 0 if record == key, 1 if record > key
|
||||||
*/
|
*/
|
||||||
public int compare(long record) throws CoreException;
|
public int compare(long record) throws CoreException;
|
||||||
|
@ -32,21 +33,22 @@ public interface IBTreeVisitor {
|
||||||
/**
|
/**
|
||||||
* Visits a given record and returns whether to continue or not.
|
* Visits a given record and returns whether to continue or not.
|
||||||
*
|
*
|
||||||
|
* @param record the offset of the record being visited
|
||||||
* @return {@code true} to continue the visit, {@code false} to abort it.
|
* @return {@code true} to continue the visit, {@code false} to abort it.
|
||||||
*/
|
*/
|
||||||
public boolean visit(long record) throws CoreException;
|
public boolean visit(long record) throws CoreException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called before visiting a node.
|
* Called before visiting a record.
|
||||||
*
|
*
|
||||||
* @param record the node being visited
|
* @param record the offset of the record being visited
|
||||||
*/
|
*/
|
||||||
public default void preNode(long record) throws CoreException {}
|
public default void preVisit(long record) throws CoreException {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called after visiting a node.
|
* Called after visiting a record.
|
||||||
*
|
*
|
||||||
* @param record the node being visited
|
* @param record the offset of the record being visited
|
||||||
*/
|
*/
|
||||||
public default void postNode(long record) throws CoreException {}
|
public default void postVisit(long record) throws CoreException {}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue