Looking through the java source code, I faced with incomprehensible for me construction in the hashCode() method of the class AbstractList. This is implementation of the hashCode method for ArrayList. I don't understand how it iterates with for-each.
public int hashCode() {
int hashCode = 1;
for (E e : this) //<--???
hashCode = 31*hashCode + (e==null ? 0 : e.hashCode());
return hashCode;
}
E is the type of the element. But to which class(type) pointer this belongs?