int findPrimary ( long p ) { // Requirement: p must occur as a root primary. assert ( ( p & 0xff ) == 0 ) ; // at most a 3-byte primary int index = findP ( p ) ; // If p is in a range, then we just assume that p is an actual primary in this range. // (Too cumbersome/expensive to check.) // Otherwise, it must be an exact match. assert ( isEndOfPrimaryRange ( elements [ index + 1 ] ) || p == ( elements [ index ] & 0xffffff00 L ) ) ; return index ; }
Finds the index of the input primary . p must occur as a root primary and must not be 0 .