org.openide.util.WeakSet.object2Entry()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(168)

本文整理了Java中org.openide.util.WeakSet.object2Entry()方法的一些代码示例,展示了WeakSet.object2Entry()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WeakSet.object2Entry()方法的具体详情如下:
包路径:org.openide.util.WeakSet
类名称:WeakSet
方法名:object2Entry

WeakSet.object2Entry介绍

暂无

代码示例

代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide

/** Returns true if this set contains the specified element.
*
* @param o an Object to examine
*/
public boolean contains(Object o) {
  if (o == null) {
    return nullCount > 0;
  }
  return object2Entry(o) != null;
}
/** Returns true if this set contains no elements.

代码示例来源:origin: in.jlibs/org-openide-util

/** Returns true if this set contains the specified element.
*
* @param o an Object to examine
*/
public boolean contains(Object o) {
  if (o == null) {
    return nullCount > 0;
  }
  return object2Entry(o) != null;
}

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide

/** Returns true if this set contains the specified element.
*
* @param o an Object to examine
*/
public boolean contains(Object o) {
  if (o == null) {
    return nullCount > 0;
  }
  return object2Entry(o) != null;
}
/** Returns true if this set contains no elements.

代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide

/** Removes the given element from this set if it is present.
*
* @param o an Object to remove
* @return <tt>true</tt> if and only if the Object was successfuly removed.
*/
public boolean remove(Object o) {
  if (o == null) {
    if (nullCount > 0) {
      nullCount--;
      modcount++;
      size--;
    }
    return true;
  }
  Entry e = object2Entry(o);
  if (e != null) {
    modcount++;
    size--;
    e.remove();
    rehash();
    return true;
  }
  return false;
}

代码示例来源:origin: in.jlibs/org-openide-util

/** Removes the given element from this set if it is present.
*
* @param o an Object to remove
* @return <tt>true</tt> if and only if the Object was successfuly removed.
*/
public boolean remove(Object o) {
  if (o == null) {
    if (nullCount > 0) {
      nullCount--;
      modcount++;
      size--;
    }
    return true;
  }
  Entry e = object2Entry(o);
  if (e != null) {
    modcount++;
    size--;
    e.remove();
    rehash();
    return true;
  }
  return false;
}

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide

/** Removes the given element from this set if it is present.
*
* @param o an Object to remove
* @return <tt>true</tt> if and only if the Object was successfuly removed.
*/
public boolean remove(Object o) {
  if (o == null) {
    if (nullCount > 0) {
      nullCount--;
      modcount++;
      size--;
    }
    return true;
  }
  Entry e = object2Entry(o);
  if (e != null) {
    modcount++;
    size--;
    e.remove();
    rehash();
    return true;
  }
  return false;
}

代码示例来源: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. */

相关文章