APISonar


java.util.ArrayList.iterator

> java > util > ArrayList > iterator
java APIs util APIs ArrayList APIs iterator APIs

Example 1
private ArrayList<Resource> files;

    public Iterator<Resource> iterator() {
        initFiles();
        return files.iterator();
    }
Example 2
private transient ArrayList objects = new ArrayList();

    public Iterator iterator()
    {
        return objects.iterator();
    }
Example 3
private ArrayList recipients = null;

    public Iterator getRecipientsIterator()
    {
        return recipients.iterator();
    }
Example 4
private ArrayList myArrayList;

	public Iterator<Object> iterator() {
		// TODO Auto-generated method stub
		return myArrayList.iterator();
	}
Example 5
private final ArrayList<String[]> techLists = new ArrayList<>();

    private void removeFromTechList(String[] techs) {
        Iterator<String[]> iterator = techLists.iterator();
        while (iterator.hasNext()) {
            String[] list = iterator.next();
            if (Arrays.equals(list, techs)) {
                iterator.remove();
            }
        }
    }
Example 6
private ArrayList<Runnable> sRegisterTasks = new ArrayList<>();

  public void flush(){
    isCollecting = false;
    mExecutor.post(new Runnable() {
      @Override
      public void run() {
        Iterator<Runnable> iterator = sRegisterTasks.iterator();
        while(iterator.hasNext()){
          Runnable item = iterator.next();
          item.run();
          iterator.remove();
        }
      }
    });
    mExecutor.setInterceptor(null);
  }
Example 7
private ArrayList<String> myData;

  private void updateData() {
    final DefaultListModel model = ((DefaultListModel)myList.getModel());
    model.clear();
    for (Iterator<String> iterator = myData.iterator(); iterator.hasNext();) {
      model.addElement(iterator.next());
    }
  }
Example 8
private ArrayList<Entry> _entries;

    public Iterator<Entry> getEntries()
    {
        return _entries.iterator();
    }
Example 9
private ArrayList<BugLeafNode> mainList;

	public Iterator<BugLeafNode> iterator()
	{	
		return mainList.iterator();
	}
Example 10
protected ArrayList groups = new ArrayList();

    public Iterator getGroups() {

        synchronized (groups) {
            return (groups.iterator());
        }

    }
Example 11
ArrayList<MenuComponent> menuComponents = new ArrayList<MenuComponent>();

	public Iterator<MenuComponent> createIterator() {
		if (iterator == null) {
			iterator = new CompositeIterator(menuComponents.iterator());
		}
		return iterator;
	}
Example 12
ArrayList<Observer> observers = new ArrayList<Observer>();

	public void notifyObservers() {
		Iterator<Observer> iterator = observers.iterator();
		while (iterator.hasNext()) {
			Observer observer = iterator.next();
			observer.update(duck);
		}
	}
Example 13
private static ArrayList	_sourceList = null;

	public static Iterator getSearchListIterator() {
		verifyList();

		synchronized (_sourceSync) {
			return _sourceList.iterator();
		}
	}
Example 14
private final ArrayList<Scope> scopes_ = new ArrayList<Scope>();

   public Iterator<Scope> iterator()
   {
      return scopes_.iterator();
   }
Example 15
public void testRemoveTwice() throws Exception {
    final ArrayList<Integer> list1 = new ArrayList<Integer>(Arrays.asList(new Integer[]{1,2,3,4,5}));
    final Iterator<Integer> iterator = compose(Arrays.<Iterator<Integer>>asList(list1.iterator()));
    try {
      iterator.next();
      iterator.remove();
      iterator.remove();  // wrong, next() should be called inside
      Assert.assertTrue(false);
    } catch (IllegalStateException e) {
      // ok
    }
  }
Example 16
protected ArrayList        formats = new ArrayList();

    public short getFormat(String format, boolean createIfNotFound) {
	Iterator iterator;
	for (iterator = formats.iterator(); iterator.hasNext();) {
	    FormatRecord r = (FormatRecord)iterator.next();
	    if (r.getFormatString().equals(format)) {
		return r.getIndexCode();
	    }
	}

	if (createIfNotFound) {
	    return createFormat(format);
	}

	return -1;
    }
Example 17
private final ArrayList<Column> columns;

    public Iterator<Column> iterator()
    {
        return columns.iterator();
    }
Example 18
public Iterator getRegisteredClasses() {
        final ArrayList l = new ArrayList();
        l.add(Object[].class);
        return l.iterator();
    }
Example 19
private ArrayList<PhotoInfo> mSelectPhotoList = new ArrayList<>();

    protected void deleteSelect(int photoId) {
        try {
            for(Iterator<PhotoInfo> iterator = mSelectPhotoList.iterator();iterator.hasNext();){
                PhotoInfo info = iterator.next();
                if (info != null && info.getPhotoId() == photoId) {
                    iterator.remove();
                    break;
                }
            }
        } catch (Exception e){}

        refreshAdapter();
    }
Example 20
protected ArrayList list = null;

    public Iterator iterator() {
        if (fast) {
            return new ListIter(0);
        } else {
            return list.iterator();
        }
    }
Example 21
private ArrayList myListeners = new ArrayList();

  private void fireContentChanged() {
    for (Iterator iterator = myListeners.iterator(); iterator.hasNext();) {
      ContentChangedListener listener = (ContentChangedListener)iterator.next();
      listener.contentChanged();
    }
  }
Example 22
private ArrayList<Future<?>> runnables = new ArrayList<Future<?>>();

    public synchronized Iterator<Future<?>> iterator() {
        enabled = false;
        return runnables.iterator();
    }
Example 23
public Iterator iterator () {
        lock.readLock().lock();
        try {
            ArrayList copy = new ArrayList();
            copy.addAll(entries);
            return copy.iterator();
        } finally {
            lock.readLock().unlock();
        }
    }
Example 24
private final ArrayList<WeakReference<E>> data = new ArrayList<>();

	public synchronized void map(final Operator<E> operator) {

		final Iterator<WeakReference<E>> iterator = data.iterator();

		while(iterator.hasNext()) {
			final E object = iterator.next().get();

			if(object == null) {
				iterator.remove();
			} else {
				operator.operate(object);
			}
		}
	}
Example 25
public List<BackupInfo> getBackupHistory(String backupRoot) throws IOException {
    ArrayList<BackupInfo> history = getBackupHistory(false);
    for (Iterator<BackupInfo> iterator = history.iterator(); iterator.hasNext();) {
      BackupInfo info = iterator.next();
      if (!backupRoot.equals(info.getBackupRootDir())) {
        iterator.remove();
      }
    }
    return history;
  }