question: private void addInstance ( EntryClass eclass ) { int idx = entryClasses . indexOf ( eclass ) ; if ( idx < 0 ) { entryClasses . add ( eclass ) ; idx = entryClasses . size ( ) - 1 ; } eclass = entryClasses . get ( idx ) ; eclass . setNumInstances ( eclass . getNumInstances ( ) + 1 ) ; }
target:  Add an instance of the EntryClass, and add the class to entryClasses if this is the first such instance.