package org.eclipse.viatra.solver.data.map.internal; import java.util.Map; import org.eclipse.viatra.solver.data.map.ContinousHashProvider; public abstract class Node{ public static final int BRANCHING_FACTOR_BITS = 5; public static final int FACTOR = 1< hashProvider, V defaultValue, int hash, int depth); public abstract Node putValue(K key, V value, OldValueBox old, ContinousHashProvider hashProvider, V defaultValue, int hash, int depth); public abstract long getSize(); abstract MutableNode toMutable(); public abstract ImmutableNode toImmutable( Map,ImmutableNode> cache); protected abstract MutableNode isMutable(); /** * Moves a {@link MapCursor} to its next position. * @param cursor the cursor * @return Whether there was a next value to move on. */ abstract boolean moveToNext(MapCursor cursor); ///////// FOR printing public abstract void prettyPrint(StringBuilder builder, int depth, int code); @Override public String toString() { StringBuilder stringBuilder = new StringBuilder(); prettyPrint(stringBuilder, 0, -1); return stringBuilder.toString(); } public void checkIntegrity(ContinousHashProvider hashProvider, V defaultValue, int depth) {} }