tests if an integer is power of two source : http://www.devmaster.net/forums/showthread.php?t=1728 concode_field_sep PlaceHolder placeHolder concode_field_sep int nextPowerOfTwo concode_elem_sep double log2
boolean function ( int arg0 ) { if ( arg0 != 0 ) { return ( arg0 & - arg0 ) == arg0 ; } else { return false ; } }