本文整理了Java中org.openide.util.WeakSet.hashIt()
方法的一些代码示例,展示了WeakSet.hashIt()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WeakSet.hashIt()
方法的具体详情如下:
包路径:org.openide.util.WeakSet
类名称:WeakSet
方法名:hashIt
暂无
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
Entry(Object referenced, ReferenceQueue q, Entry next, Entry nextInIter) {
super (referenced, q);
this.next = next;
this.prev = null;
if (next != null) {
next.prev = this;
}
if (referenced != null) {
hashcode = hashIt(referenced);
} else {
hashcode = 0;
}
chainIntoIter(nextInIter);
}
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
Entry(Object referenced, ReferenceQueue q, Entry next, Entry nextInIter) {
super (referenced, q);
this.next = next;
this.prev = null;
if (next != null) {
next.prev = this;
}
if (referenced != null) {
hashcode = hashIt(referenced);
} else {
hashcode = 0;
}
chainIntoIter(nextInIter);
}
代码示例来源:origin: in.jlibs/org-openide-util
Entry(WeakSet<E> set, E referenced, ReferenceQueue<E> q, Entry<E> next, Entry<E> nextInIter) {
super(referenced, q);
this.set = set;
this.next = next;
this.prev = null;
if (next != null) {
next.prev = this;
}
if (referenced != null) {
hashcode = set.hashIt(referenced);
} else {
hashcode = 0;
}
chainIntoIter(nextInIter);
}
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
/** @return an Entry with given object */
private Entry object2Entry(Object o) {
checkRefQueue(); // clear ref q
int hash = hashIt(o);
Entry e = entries[hash];
if (e == null) {
return null;
}
while ((e != null) && !e.equals(o)) {
e = e.next;
}
return e;
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
/** @return an Entry with given object */
private Entry object2Entry(Object o) {
checkRefQueue(); // clear ref q
int hash = hashIt(o);
Entry e = entries[hash];
if (e == null) {
return null;
}
while ((e != null) && !e.equals(o)) {
e = e.next;
}
return e;
}
代码示例来源:origin: in.jlibs/org-openide-util
/** @return an Entry with given object */
private Entry object2Entry(Object o) {
checkRefQueue(); // clear ref q
int hash = hashIt(o);
Entry e = entries[hash];
if (e == null) {
return null;
}
while ((e != null) && !e.equals(o)) {
e = e.next;
}
return e;
}
代码示例来源:origin: in.jlibs/org-openide-util
/** Adds the specified element to this set if it is not already present.
*
* @param o an Object to add
*/
public boolean add(E o) {
if (o == null) {
size++;
nullCount++;
modcount++;
return true;
}
Entry e = object2Entry(o);
if (e != null) {
return false;
}
modcount++;
size++;
int hash = hashIt(o);
Entry<E> next = entries[hash];
iterChain = entries[hash] = new Entry<E>(this, o, refq, next, iterChain);
rehash();
return true;
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
/** Adds the specified element to this set if it is not already present.
*
* @param o an Object to add
*/
public boolean add(Object o) {
if (o == null) {
size++;
nullCount++;
modcount++;
return true;
}
Entry e = object2Entry(o);
if (e != null) {
return false;
}
modcount++;
size++;
int hash = hashIt(o);
Entry next = entries[hash];
iterChain = entries[hash] = new Entry(o, refq, next, iterChain);
rehash();
return true;
}
/** Removes all of the elements from this set. */
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
/** Adds the specified element to this set if it is not already present.
*
* @param o an Object to add
*/
public boolean add(Object o) {
if (o == null) {
size++;
nullCount++;
modcount++;
return true;
}
Entry e = object2Entry(o);
if (e != null) {
return false;
}
modcount++;
size++;
int hash = hashIt(o);
Entry next = entries[hash];
iterChain = entries[hash] = new Entry(o, refq, next, iterChain);
rehash();
return true;
}
/** Removes all of the elements from this set. */
内容来源于网络,如有侵权,请联系作者删除!