public int set ( int pos ) { while ( pos >= capacity ) { doubleCapacity ( ) ; } if ( pos >= limitPos ) { limitPos = pos + 1 ; } int windex = pos >> 5 ; int mask = 0x80000000 >>> ( pos & 0x1F ) ; int word = map [ windex ] ; int result = ( word & mask ) == 0 ? 0 : 1 ; map [ windex ] = ( word | mask ) ; return result ; }
Sets pos and returns old value