
org.snapscript.core.EntityTree Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of snap-all Show documentation
Show all versions of snap-all Show documentation
Dynamic scripting for the JVM
package org.snapscript.core;
import org.snapscript.common.Cache;
import org.snapscript.common.CopyOnWriteCache;
import org.snapscript.core.type.Type;
public class EntityTree {
private final EntityCache> cache;
public EntityTree() {
this.cache = new EntityCache>();
}
public Cache get(Type type) {
Cache table = cache.fetch(type);
if(table == null) {
table = new CopyOnWriteCache();
cache.cache(type, table);
}
return table;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy