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

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

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

WeakSet.iterator介绍

[英]Returns an iterator over the elements in this set.
[中]返回此集合中元素的迭代器。

代码示例

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

public Object[] toArray(Object[] array) {
  ArrayList list = new ArrayList(array.length);
  Iterator it = iterator();
  while (it.hasNext()) {
    list.add(it.next());
  }
  
  return list.toArray(array);
}

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

public Object[] toArray() {
  ArrayList list = new ArrayList();
  Iterator it = iterator();
  while (it.hasNext()) {
    list.add(it.next());
  }
  
  return list.toArray();
}

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

public Object[] toArray() {
  ArrayList list = new ArrayList();
  Iterator it = iterator();
  while (it.hasNext()) {
    list.add(it.next());
  }
  
  return list.toArray();
}

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

public <T> T[] toArray(T[] array) {
  ArrayList<E> list = new ArrayList<E>(array.length);
  Iterator<E> it = iterator();
  while (it.hasNext()) {
    list.add(it.next());
  }
  return list.toArray(array);
}

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

public Object[] toArray() {
  ArrayList<E> list = new ArrayList<E>();
  Iterator<E> it = iterator();
  while (it.hasNext()) {
    list.add(it.next());
  }
  return list.toArray();
}

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

public Object[] toArray(Object[] array) {
  ArrayList list = new ArrayList(array.length);
  Iterator it = iterator();
  while (it.hasNext()) {
    list.add(it.next());
  }
  
  return list.toArray(array);
}

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

public String toString() {
  StringBuffer buf = new StringBuffer();
  Iterator e = iterator();
  buf.append("[");
  while (e.hasNext()) {
    buf.append(String.valueOf(e.next()));
    if (e.hasNext()) {
      buf.append(", ");
    }
  }
  buf.append("]");
  return buf.toString();
}

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

public String toString() {
StringBuffer buf = new StringBuffer();
Iterator e = iterator();
buf.append("[");
  while (e.hasNext()) {
  buf.append(String.valueOf(e.next()));
  if (e.hasNext())
  buf.append(", ");
}
buf.append("]");
return buf.toString();
}

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

public String toString() {
StringBuffer buf = new StringBuffer();
Iterator e = iterator();
buf.append("[");
  while (e.hasNext()) {
  buf.append(String.valueOf(e.next()));
  if (e.hasNext())
  buf.append(", ");
}
buf.append("]");
return buf.toString();
}

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

/**
 * Updates the list of delegates. Also updates all instances created
 * by ourselves.
 */
public synchronized void setDelegates(Collection newDelegates) {
  java.util.LinkedHashSet d = new java.util.LinkedHashSet(newDelegates);
  delegates = d;
  for (Iterator i = createdByMe.iterator(); i.hasNext(); ) {
    DelegatingErrorManager dem = (DelegatingErrorManager)i.next();
    attachNewDelegates(dem, dem.getName());
  }
}

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

/**
 * Updates the list of delegates. Also updates all instances created
 * by ourselves.
 */
public synchronized void setDelegates(Collection newDelegates) {
  java.util.LinkedHashSet d = new java.util.LinkedHashSet(newDelegates);
  delegates = d;
  for (Iterator i = createdByMe.iterator(); i.hasNext(); ) {
    DelegatingErrorManager dem = (DelegatingErrorManager)i.next();
    attachNewDelegates(dem, dem.getName());
  }
}

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

void setDnDActive (boolean state) {
  isDnDActive = state;
  if (setOfTargets != null && !setOfTargets.isEmpty ()) {
    Iterator it = setOfTargets.iterator();
    while (it.hasNext ()) {
      JScrollPane pane = (JScrollPane)it.next ();
      if (pane.isEnabled ()) {
        if (pane instanceof TreeView) {
          ((TreeView)pane).setDropTarget (state);
        } else if (pane instanceof ListView) {
          ((ListView)pane).setDropTarget (state);
        }
      }
    }
  }
}

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

void setDnDActive (boolean state) {
  isDnDActive = state;
  if (setOfTargets != null && !setOfTargets.isEmpty ()) {
    Iterator it = setOfTargets.iterator();
    while (it.hasNext ()) {
      JScrollPane pane = (JScrollPane)it.next ();
      if (pane.isEnabled ()) {
        if (pane instanceof TreeView) {
          ((TreeView)pane).setDropTarget (state);
        } else if (pane instanceof ListView) {
          ((ListView)pane).setDropTarget (state);
        }
      }
    }
  }
}

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

private InvRadioButton[] getButtons(int count) {
  InvRadioButton[] result = new InvRadioButton[count];
  Iterator<InvRadioButton> i = buttonCache.iterator();
  int idx = 0;
  while (i.hasNext() && (idx < count)) {
    result[idx] = i.next();
    if (result[idx] != null) {
      result[idx].setEnabled(true);
      result[idx].setSelected(false);
      idx++;
    }
  }
  for (; idx < count; idx++) {
    result[idx] = createButton();
    buttonCache.add(result[idx]);
  }
  return result;
}

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

private InvRadioButton[] getButtons(int count) {
  InvRadioButton[] result = new InvRadioButton[count];
  Iterator i = buttonCache.iterator();
  int idx=0;
  while (i.hasNext() && idx < count) {
    result[idx] = (InvRadioButton) i.next();
    if (result[idx] != null) {
      result[idx].setEnabled(true);
      result[idx].setSelected(false);
      idx++;
    }
  }
  for (;idx < count; idx++) {
    result[idx] = createButton();
    buttonCache.add(result[idx]);
  }
  return result;  
}

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

private InvRadioButton[] getButtons(int count) {
  InvRadioButton[] result = new InvRadioButton[count];
  Iterator i = buttonCache.iterator();
  int idx=0;
  while (i.hasNext() && idx < count) {
    result[idx] = (InvRadioButton) i.next();
    if (result[idx] != null) {
      result[idx].setEnabled(true);
      result[idx].setSelected(false);
      idx++;
    }
  }
  for (;idx < count; idx++) {
    result[idx] = createButton();
    buttonCache.add(result[idx]);
  }
  return result;  
}

相关文章