iterator « concurrency « Java Thread Q&A

Home
Java Thread Q&A
1.concurrency
2.Development
3.Exception
4.Notify
5.Operation
6.Socket
7.State
8.synchronize
9.Thread Safe
10.ThreadPool
Java Thread Q&A » concurrency » iterator 

1. ConcurrentModificationException java iterator.next();    stackoverflow.com

 public synchronized X getAnotherX(){ 
  if(iterator.hasNext()){
   X b = iterator.next();
   String name = b.getInputFileName();
  ...
   return b;
  }
  else{return null;}
 ...

2. Java Iterator implementation - next() and hasNext() enforcing order    stackoverflow.com

I have an implementation of java.util.Iterator which requires that the call to next() should always be proceeded by a call to hasNext(). (This is because results are returned asynchronosly in a ...

3. java: concurrent iteration over an immutable Iterable    stackoverflow.com

I have an immutable Iterable<X> with a large number of elements. (it happens to be a List<> but never mind that.) What I would like to do is start a few parallel ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.