int function ( T arg0 ) { checkInitialization ( ) ; int loc0 = 0 ; for ( int loc1 = 0 ; loc1 < numberOfEntries ; loc1 ++ ) { if ( arg0 . equals ( bag [ loc1 ] ) ) { loc0 ++ ; } } return loc0 ; }
counts the number of times a given entry appears in this bag . concode_field_sep int numberOfEntries concode_elem_sep int DEFAULT_CAPACITY concode_elem_sep T[] bag concode_elem_sep int MAX_CAPACITY concode_elem_sep boolean initialized concode_field_sep boolean add concode_elem_sep T removeEntry concode_elem_sep boolean contains concode_elem_sep int getIndexOf concode_elem_sep void checkInitialization concode_elem_sep boolean isArrayFull concode_elem_sep T[] toArray concode_elem_sep boolean isEmpty concode_elem_sep void clear concode_elem_sep T remove concode_elem_sep boolean remove concode_elem_sep int getCurrentSize