public boolean containsDouble ( double value ) { boolean isNan = Double . isNaN ( value ) ; for ( int i = 1 ; i < maxPoolSize ; i ++ ) { if ( types [ i ] == DOUBLE ) { double d = readDouble ( i ) ; if ( d == value || ( isNan && Double . isNaN ( d ) ) ) return true ; } } return false ; }
Checks if the constant pool contains the provided double constant which implies the constant is used somewhere in the code .