@ Override public ScriptableObject . Slot query ( Object key , int index ) { if ( slots == null ) { return null ; } final int indexOrHash = ( key != null ? key . hashCode ( ) : index ) ; final int slotIndex = getSlotIndex ( slots . length , indexOrHash ) ; for ( ScriptableObject . Slot slot = slots [ slotIndex ] ; slot != null ; slot = slot . next ) { Object skey = slot . name ; if ( indexOrHash == slot . indexOrHash && ( skey == key || ( key != null && key . equals ( skey ) ) ) ) { return slot ; } } return null ; }
Locate the slot with the given name or index .