📄 icltermcache.java
字号:
package com.sri.oaa2.icl;
import java.util.HashMap;
public class IclTermCache
{
public static HashMap cacheMap = new HashMap();
public static IclTerm get(String s)
{
synchronized(cacheMap) {
if(cacheMap.containsKey(s)) {
IclTerm t = (IclTerm)cacheMap.get(s);
t = ToReadOnly.getInstance().from(t, false);
AnonNumberer.getInstance().renumber(t);
t = ToReadOnly.getInstance().from(t, true);
return t;
}
else {
IclTerm t;
try {
t = IclTerm.fromString(s);
}
catch(Exception e) {
RuntimeException re = new RuntimeException(e.toString());
re.fillInStackTrace();
throw re;
}
cacheMap.put(s, t);
return t;
}
}
}
public static IclTerm getNoAnon(String s)
{
synchronized(cacheMap) {
if(cacheMap.containsKey(s)) {
IclTerm t = (IclTerm)cacheMap.get(s);
return t;
}
else {
IclTerm t;
try {
t = IclTerm.fromString(s);
}
catch(Exception e) {
RuntimeException re = new RuntimeException(e.toString());
re.fillInStackTrace();
throw re;
}
cacheMap.put(s, t);
return t;
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -