I have the following code:
for (Attribute thisAttribute : factor.getAttributes()) {
where factor.getAttributes() returns a List<Attribute> .
Apparently, there is only one initial call to factor.getAttributes() , and then the crawl begins. However, I do not understand why there is only one call. If I included a function call in the header of a regular for() loop, I believe that it will be evaluated at each iteration. In this regard, how and why is there an extended cycle?
James source share