public static int findMemberIndex ( final ClusterMember [ ] clusterMembers , final int memberId ) { final int length = clusterMembers . length ; int index = ArrayUtil . UNKNOWN_INDEX ; for ( int i = 0 ; i < length ; i ++ ) { if ( clusterMembers [ i ] . id ( ) == memberId ) { index = i ; } } return index ; }
Find the index at which a member id is present .