/** * For binary fields, return the current state. * Gets the state of the target bit. * @param True is this field is true. */ public boolean getState() { if (this.getData() == null) return m_bTrueIfNull; int fieldValue = (int)this.getValue(); boolean returnValue = false; if ((fieldValue & (1 << m_iBitNumber)) != 0) returnValue = true; if (m_bTrueIfMatch) return returnValue; else return !returnValue; } /**
/** * For binary fields, set the current state. * Sets the target bit to the state. * @param state The state to set this field. * @param bDisplayOption Display changed fields if true. * @param iMoveMode The move mode. * @return The error code (or NORMAL_RETURN). */ 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. * @param state The state to set this field. * @param bDisplayOption Display changed fields if true. * @param iMoveMode The move mode. * @return The error code (or NORMAL_RETURN). */ 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. * @param state The state to set this field. * @param bDisplayOption Display changed fields if true. * @param iMoveMode The move mode. * @return The error code (or NORMAL_RETURN). */ 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, return the current state. * Gets the state of the target bit. * @param True is this field is true. */ public boolean getState() { if (this.getData() == null) return m_bTrueIfNull; int fieldValue = (int)this.getValue(); boolean returnValue = false; if ((fieldValue & (1 << m_iBitNumber)) != 0) returnValue = true; if (m_bTrueIfMatch) return returnValue; else return !returnValue; } /**
/** * For binary fields, return the current state. * Gets the state of the target bit. * @param True is this field is true. */ public boolean getState() { if (this.getData() == null) return m_bTrueIfNull; int fieldValue = (int)this.getValue(); boolean returnValue = false; if ((fieldValue & (1 << m_iBitNumber)) != 0) returnValue = true; if (m_bTrueIfMatch) return returnValue; else return !returnValue; } /**