public static int set ( int list , int val , int n ) { int cnt = ( list >> 28 ) & 0xf ; int newc = n + 1 ; cnt = newc > cnt ? newc : cnt ; return ( list & CLEAR_MASK [ n ] ) | ( ( val & 0xff ) << ( n << 2 ) ) | ( cnt << 28 ) ; }
Sets a 4 bit value into the list