protected int getListenerIndex ( ChangeListener listener ) { if ( _listeners == null ) { return - 1 ; } for ( int ii = 0 , ll = _listeners . length ; ii < ll ; ii ++ ) { Object olistener = _listeners [ ii ] ; if ( olistener == listener || ( olistener instanceof WeakReference < ? > && ( ( WeakReference < ? > ) olistener ) . get ( ) == listener ) ) { return ii ; } } return - 1 ; }
Returns the index of the identified listener or - 1 if not found .