convex.etch.EtchUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of convex-core Show documentation
Show all versions of convex-core Show documentation
Convex core libraries and common utilities
The newest version!
package convex.etch;
import java.io.IOException;
import convex.core.data.ACell;
import convex.core.data.Hash;
import convex.core.util.Utils;
public class EtchUtils {
public static FullValidator getFullValidator() {
return new FullValidator();
}
/**
* An Etch validator that checks every index entry
*/
public static class FullValidator implements IEtchIndexVisitor {
public long visited=0;
public long entries=0;
public long empty=0;
public long values=0;
public long indexPtrs=0;
@Override
public void visit(Etch e, int level, int[] digits, long indexPointer) throws IOException {
visited++;
int isize=e.indexSize(level);
String ps="";
for (int ll=0; ll