Ejemplo n.º 1
0
 public virtual bool hasNext()
 {
     checkMod();
     while (nextNull())
     {
         ReferenceEntry e = entry;
         int            i = index;
         while ((e == null) && (i > 0))
         {
             i--;
             e = (ReferenceEntry)parent.data[i];
         }
         entry = e;
         index = i;
         if (e == null)
         {
             currentKey   = null;
             currentValue = null;
             return(false);
         }
         nextKey   = e.getKey();
         nextValue = e.getValue();
         if (nextNull())
         {
             entry = entry.next();
         }
     }
     return(true);
 }
Ejemplo n.º 2
0
 protected virtual ReferenceEntry nextEntry()
 {
     checkMod();
     if (nextNull() && !hasNext())
     {
         throw new java.util.NoSuchElementException();
     }
     previous     = entry;
     entry        = entry.next();
     currentKey   = nextKey;
     currentValue = nextValue;
     nextKey      = null;
     nextValue    = null;
     return(previous);
 }