Methods Summary 

protected abstract void  Destroy()Abstract method for destroying this BindingIterator.

protected abstract boolean  NextOne(org.omg.CosNaming.BindingHolder b)Abstract method for returning the next binding in the NamingContext
for which this BindingIterator was created.

protected abstract int  RemainingElements()Abstract method for returning the remaining number of elements.

public synchronized void  destroy()Destroy this BindingIterator object. The object corresponding to this
object reference is destroyed.
// Destroy actually destroys
this.Destroy();

public boolean  list(int how_many, org.omg.CosNaming.BindingListHolder blh)lists next n bindings. It returns true or false, indicating
whether there were more bindings. This method has the package private
scope, It will be called from NamingContext.list() operation or
this.next_n().
// Take the smallest of what's left and what's being asked for
int numberToGet = Math.min(RemainingElements(),how_many);
// Create a resulting BindingList
Binding[] bl = new Binding[numberToGet];
BindingHolder bh = new BindingHolder();
int i = 0;
// Keep iterating as long as there are entries
while (i < numberToGet && this.NextOne(bh) == true) {
bl[i] = bh.value;
i++;
}
// Found any at all?
if (i == 0) {
// No
blh.value = new Binding[0];
return false;
}
// Set into holder
blh.value = bl;
return true;

public synchronized boolean  next_n(int how_many, org.omg.CosNaming.BindingListHolder blh)Return the next n bindings. It also returns true or false, indicating
whether there were more bindings.
if( how_many == 0 ) {
throw new BAD_PARAM( " 'how_many' parameter is set to 0 which is" +
" invalid" );
}
return list( how_many, blh );

public synchronized boolean  next_one(org.omg.CosNaming.BindingHolder b)Return the next binding. It also returns true or false, indicating
whether there were more bindings.
// NextOne actually returns the next one
return NextOne(b);
