corrected some javadoc and simplified java calls

Doesn't this allocate memory for the iterator? I think that with our custom collections this doesn't happen though. Would you know for certain?