Sets the current state for this edit to the inputed state.
        
        :param      state | <XLineEdit.State>
973983
def setCurrentState(self, state):
        
        self._currentState = state
        
        palette = self.palette()
        if state == XLineEdit.State.Normal:
            palette = QApplication.instance().palette()
        
        elif state == XLineEdit.State.Failed:
            palette.setColor(palette.Base, QColor('#ffc9bc'))
            palette.setColor(palette.Text, QColor('#aa2200'))
            palette.setColor(palette.Disabled, palette.Text, QColor('#e58570'))
        
        elif state == XLineEdit.State.Passed:
            palette.setColor(palette.Base, QColor('#d1ffd1'))
            palette.setColor(palette.Text, QColor('#00aa00'))
            palette.setColor(palette.Disabled, palette.Text, QColor('#75e575'))
        
        self._hintColor = palette.color(palette.Disabled, palette.Text)
        self.setPalette(palette)
1156297
void setState(final WorldState state) {
		if (this.ready) {
			throw new IllegalStateException(
					"Cannot reassign the world state of a response.");
		}
		this.state = state;
		this.ready = true;
		// Notify any blocking/waiting threads
		synchronized (this) {
			this.notifyAll();
		}
	}
337898
public boolean set(State state) {
    while (true) {
      InternalState internalState = currentInternalState.get();
      checkState(!internalState.isRead, "State was already read, cannot set state.");
      if (state == internalState.state) {
        return false;
      } else {
        if (!currentInternalState.compareAndSet(
            internalState,
            state == State.ENABLED
                ? InternalState.ENABLED_NOT_READ
                : InternalState.DISABLED_NOT_READ)) {
          // The state was changed between the moment the internalState was read and this point.
          // Some conditions may be not correct, reset at the beginning and recheck all conditions.
          continue;
        }
        return true;
      }
    }
  }
824340
void setState(final WidgetState.State state) {
        Log.d(TAG, "setState(%s): state is %s, setting to %s", mWidget.getName(), mState, state);
        if (state != mState) {
            final WidgetState.State nextState = getNextState(state);
            Log.d(TAG, "setState(%s): next state '%s'", mWidget.getName(), nextState);
            if (nextState != mState) {
                Log.d(TAG, "setState(%s): setting state to '%s'", mWidget.getName(), nextState);
                setCurrentState(false);
                mState = nextState;
                setCurrentState(true);
            }
        }
    }
1267558
def setValidated( self, state ):
        
        self._validated = state
        palette = self.palette()
        
        # reset the palette to default, revalidate
        self._filepathEdit.setPalette(palette)
        self.validate()
988509
def set_state(k, v)
        if @state[k] != v # Only set state if it has actually changed
          @state[k] = v

          if !self.methods.include? k
            self.define_singleton_method(k.to_sym) do
              return State.new(@state[k])
            end
          end

          notify_listeners(k)
        end
      end
392696
private void setState(IState toState)
    {
        // We want to make sure state changes happen purely on the "home" thread,
        // for the sake of sanity and avoiding many obscure race-condition bugs.
        if (Thread.currentThread() == this.homeThread)
        {
            // We are on the home thread, so safe to proceed:
            if (this.state != toState)
            {
                System.out.println(getName() + " enter state: " + toState);
                TCPUtils.Log(Level.INFO, "======== " + getName() + " enter state: " + toState + " ========");
                this.state = toState;
                onPreStateChange(toState);
                onStateChange();
            }
        }
        else
        {
            // We are not on the home thread; queue this state transition
            // so that the home thread can act on it.
            queueStateChange(toState);
        }
    }
306177
private void updateState(final TaskStatus.State state) {
    statusUpdater.setState(state);
    // Commit and push a new status
    try {
      statusUpdater.update();
    } catch (InterruptedException e) {
      // TODO: propagate interrupt instead?
      Thread.currentThread().interrupt();
    }
  }
405800
private void setState(State state) {
    if (this.state != state) {
      this.state = state;
      LOGGER.debug("State changed: {}", state);
      changeListeners.forEach(l -> l.accept(state));
    }
  }
185373
def set_state(self, state):
        
        values = {"desired_state": {"locked": state}}
        response = self.api_interface.local_set_state(self, values)
        self._update_state_from_response(response)
697633
def set_state(self, state):
        
        for k, v in state.items():
            setattr(self, k, v)
1085548
def setFontItalic(self, state):
        
        font = self.currentFont()
        font.setItalic(state)
        self.setCurrentFont(font)
555465
def set_state(self, updater=None, **kwargs):
        
        if callable(updater):
            state_change = updater(self)
        elif updater is not None:
            state_change = updater
        else:
            state_change = kwargs

        return [callback_result
                for k, v in state_change.items()
                for callback_result in self.set(k, v)]
1134916
def set_status(self, status):
        
        if status is not self.status:
            logger.debug("Setting %s state to %s.", self.stack.name,
                         status.name)
            self.status = status
            self.last_updated = time.time()
            if self.stack.logging:
                log_step(self)
1058712
def _set_state(self, state):
        
        if state != self._association_state:
            self.__log_debug('- %s -> %s', self._association_state, state)
            self._association_state = state

        if state == self.State.ESTABLISHED:
            self.__state = 'connected'
            for channel in list(self._data_channels.values()):
                if channel.negotiated and channel.readyState != 'open':
                    channel._setReadyState('open')
            asyncio.ensure_future(self._data_channel_flush())
        elif state == self.State.CLOSED:
            self._t1_cancel()
            self._t2_cancel()
            self._t3_cancel()
            self.__state = 'closed'

            # close data channels
            for stream_id in list(self._data_channels.keys()):
                self._data_channel_closed(stream_id)

            # no more events will be emitted, so remove all event listeners
            # to facilitate garbage collection.
            self.remove_all_listeners()
817465
def setModified( self, state = True ):
        
        if ( state == self._modified ):
            return
            
        self._modified = state
        self.emitModifiedStateChanged()
71002
public void setInput( I input ) {
		this.inputImage = input;

		// reset the state flag so that everything need sto be computed
		if( stale != null ) {
			for( int i = 0; i < stale.length; i++) {
				boolean a[] = stale[i];
				for( int j = 0; j < a.length; j++ ) {
					a[j] = true;
				}
			}
		}
	}