Ejemplo n.º 1
0
 /** Removes the empty iterators. */
 private void removeEmptyIterators() {
   List<ResolvedConceptReferencesIterator> newList =
       new ArrayList<ResolvedConceptReferencesIterator>();
   for (ResolvedConceptReferencesIterator itr : _iterators) {
     try {
       if (itr.hasNext()) {
         newList.add(itr);
       }
     } catch (LBResourceUnavailableException e) {
       throw new RuntimeException(e);
     }
   }
   _iterators = newList;
 }
Ejemplo n.º 2
0
 /**
  * Gets the next from list.
  *
  * @return the next from list
  */
 private ResolvedConceptReference getNextFromList() {
   try {
     while (hasNext()) {
       int iterator = _currentIterator % _iterators.size();
       ResolvedConceptReferencesIterator itr = _iterators.get(iterator);
       if (itr.hasNext()) {
         _currentIterator++;
         return itr.next();
       } else {
         _currentIterator++;
       }
     }
     return null;
   } catch (Exception e) {
     throw new RuntimeException(e);
   }
 }