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

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

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

WeakSet.<init>介绍

[英]Constructs a new, empty WeakSet with the default initial capacity (16) and load factor (0.75).
[中]使用默认初始容量(16)和负载系数(0.75)构造一个新的空WeakSet。

代码示例

代码示例来源:origin: org.netbeans.api/org-openide-filesystems

private Set<InputStream> iStream() {
  if (iStreams == null) {
    iStreams = new WeakSet<InputStream>();
  }
  return iStreams;
}

代码示例来源:origin: org.netbeans.api/org-openide-filesystems

private Set<OutputStream> oStream() {
  if (oStreams == null) {
    oStreams = new WeakSet<OutputStream>();
  }
  return oStreams;
}

代码示例来源:origin: org.netbeans.api/org-openide-filesystems

Collection<Element> originatingElementsL = originatingElementsByProcessor.get(filer);
if (originatingElementsL == null) {
  originatingElementsL = new WeakSet<Element>();
  originatingElementsByProcessor.put(filer, originatingElementsL);

代码示例来源:origin: org.netbeans.api/org-openide-nodes

public <T> Result<T> lookup(Template<T> template) {
  ProxyResult<T> p = new ProxyResult<T>(template);
  synchronized (this) {
    if (results == null) {
      results = new WeakSet<ProxyResult>();
    }
    results.add(p);
  }
  return p;
}

代码示例来源:origin: org.netbeans.api/org-openide-awt

public final void registerListener(Object key, GeneralAction.BaseDelAction a) {
  if (key == null) {
    return;
  }
  synchronized (CACHE) {
    Set<GeneralAction.BaseDelAction> existing = listeners.get(key);
    if (existing == null) {
      existing = new WeakSet<GeneralAction.BaseDelAction>();
      listeners.put(key, existing);
    }
    existing.add(a);
    a.updateState(new ActionMap(), actionMap.get(), false);
  }
}

代码示例来源:origin: org.netbeans.api/org-openide-nodes

private static final Set<NodeAction> listeningActions = new WeakSet<NodeAction>(100);

代码示例来源:origin: org.netbeans.api/org-openide-awt

public AbstractButton getToolbarPresenter() {
  if(toolbarItems == null) {
    toolbarItems = new WeakSet<AbstractButton>(4);
  }
  AbstractButton b = new DefaultIconToggleButton();
  toolbarItems.add(b);
  b.setSelected(isPreferencesSelected());
  Actions.connect(b, this);
  return b;
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-apt

/** Creates a new instance of HolderCache */
private APTSingleHolderManager(int initialCapacity) {
  storage = new WeakSet<Holder>(initialCapacity);
  this.initialCapacity = initialCapacity;
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-apt

/** Creates a new instance of APTMacroCache */
private APTSingleMacroManager(int initialCapacity) {
  storage = new WeakSet<APTMacro>(initialCapacity);
  this.initialCapacity = initialCapacity;
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-utils

/** Creates a new instance of APTStringManager */
private APTSingleStringManager(String name, int initialCapacity) {
  storage = new WeakSet<CharSequence>(initialCapacity);
  this.initialCapacity = initialCapacity;
  // To gebug
  this.name = name;
}

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

private Set oStream () {
  if (oStreams == null) oStreams = new WeakSet ();
  return oStreams;
}

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

private Set iStream () {
  if (iStreams == null) iStreams = new WeakSet ();
  return iStreams;
}

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

private Set iStream () {
  if (iStreams == null) iStreams = new WeakSet ();
  return iStreams;
}

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

private Set oStream () {
  if (oStreams == null) oStreams = new WeakSet ();
  return oStreams;
}

代码示例来源:origin: org.netbeans.api/org-netbeans-modules-java-source-base

public synchronized void addChangeListener(URL source, ChangeListener l) {
  String ext = source.toExternalForm();
  
  listener2File.put(l, ext);
  
  Set<ChangeListener> ls = file2Listener.get(ext);
  
  if (ls == null) {
    file2Listener.put(ext, ls = new WeakSet<ChangeListener>());
  }
  
  ls.add(l);
  
  file2Listener.put(ext, ls);
}

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

void addFutureDropTarget (JScrollPane view) {
    if (setOfTargets == null)
      setOfTargets = new WeakSet ();
    setOfTargets.add (view);
  }
}

代码示例来源:origin: org.netbeans.api/org-netbeans-modules-vmd-properties

private void addPropertySupport(DesignComponent component, DefaultPropertySupport propertySupport) {
  WeakSet<DefaultPropertySupport> propertySupports = propertySupportMap.get(component);
  if (propertySupports == null) {
    propertySupports = new WeakSet<DefaultPropertySupport>();
    propertySupportMap.put(component, propertySupports);
  }
  propertySupports.add(propertySupport);
}

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

void addFutureDropTarget (JScrollPane view) {
    if (setOfTargets == null)
      setOfTargets = new WeakSet ();
    setOfTargets.add (view);
  }
}

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

public Result lookup(Template template) {
  ProxyResult p = new ProxyResult (template);
  synchronized (this) {
    if (results == null) {
      results = new org.openide.util.WeakSet ();
    }
    results.add (p);
  }
  return p;
}

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

public Result lookup(Template template) {
  ProxyResult p = new ProxyResult (template);
  synchronized (this) {
    if (results == null) {
      results = new org.openide.util.WeakSet ();
    }
    results.add (p);
  }
  return p;
}

相关文章