public int setState ( boolean bState , boolean bDisplayOption , int iMoveMode ) { int iFieldValue = ( int ) this . getValue ( ) ; if ( ! m_bTrueIfMatch ) bState = ! bState ; // Do opposite operation if ( bState ) iFieldValue |= ( 1 << m_iBitNumber ) ; // Set the bit else iFieldValue &= ~ ( 1 << m_iBitNumber ) ; // Clear the bit return this . setValue ( iFieldValue , bDisplayOption , iMoveMode ) ; }
For binary fields set the current state . Sets the target bit to the state .