本文整理了Java中clojure.lang.Keyword.<init>()
方法的一些代码示例,展示了Keyword.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Keyword.<init>()
方法的具体详情如下:
包路径:clojure.lang.Keyword
类名称:Keyword
方法名:<init>
暂无
代码示例来源:origin: videlalvaro/clochure
public static Keyword intern(Symbol sym){
if(sym.meta() != null)
sym = (Symbol) sym.withMeta(null);
Util.clearCache(rq, table);
Keyword k = new Keyword(sym);
Reference<Keyword> existingRef = table.putIfAbsent(sym, new WeakReference<Keyword>(k,rq));
if(existingRef == null)
return k;
Keyword existingk = existingRef.get();
if(existingk != null)
return existingk;
//entry died in the interim, do over
table.remove(sym, existingRef);
return intern(sym);
}
代码示例来源:origin: org.dunaj/clojure
public static Keyword intern(Symbol sym){
Keyword k = null;
Reference<Keyword> existingRef = table.get(sym);
if(existingRef == null)
{
Util.clearCache(rq, table);
if(sym.meta() != null)
sym = (Symbol) sym.withMeta(null);
k = new Keyword(sym);
existingRef = table.putIfAbsent(sym, new WeakReference<Keyword>(k, rq));
}
if(existingRef == null)
return k;
Keyword existingk = existingRef.get();
if(existingk != null)
return existingk;
//entry died in the interim, do over
table.remove(sym, existingRef);
return intern(sym);
}
内容来源于网络,如有侵权,请联系作者删除!