Rotates the {@link IBlockState} by a factor of 90 degrees counter-clockwise.

@param state the state
@param angle the angle
@return the i block state
764638
public static IBlockState rotate(IBlockState state, int angle)
	{
		int a = -angle & 3;
		if (a == 0)
			return state;

		PropertyDirection property = DirectionalComponent.getProperty(state.getBlock());
		if (property == null || !state.getProperties().containsKey(property))
			return state;

		return state.withProperty(property, EnumFacingUtils.rotateFacing(state.getValue(property), a));
	}
1004135
@GuardedBy("lock")
  private boolean hasPotentialHedging(State state) {
    return state.winningSubstream == null
        && state.hedgingAttemptCount < hedgingPolicy.maxAttempts
        && !state.hedgingFrozen;
  }
333498
public int setState(boolean state, boolean bDisplayOption, int iMoveMode)
    {       // Must be overidden
        if (this.getNextConverter() != null)
            return this.getNextConverter().setState(state, bDisplayOption, iMoveMode);
        else
            return super.setState(state, bDisplayOption, iMoveMode);
    }
122937
def set_state(block, state):
        
        if block is None:
            return
        user_state = block.userState()
        if user_state == -1:
            user_state = 0
        higher_part = user_state & 0x7FFF0000
        state &= 0x0000FFFF
        state |= higher_part
        block.setUserState(state)
1317801
private synchronized void setState(int state) {
        mState = state;

        // Give the new state to the Handler so the UI Activity can update
        mHandler.obtainMessage(ISOBlueDemo.MESSAGE_STATE_CHANGE, state, -1)
                .sendToTarget();
    }
499881
def blockSignals( self, state ):
        
        super(XUrlWidget, self).blockSignals(state)
        self._urlEdit.blockSignals(state)
        self._urlButton.blockSignals(state)
647532
@Override
    public void setState(RelayState state) {

        // apply the new pin state
        switch(state) {
            case OPEN: {
                if(!isOpen()) {
                    pin.setState(openState);
                }
                break;
            }
            case CLOSED: {
                if(!isClosed()) {
                    pin.setState(closedState);
                }
                break;
            }
            default: {
                throw new UnsupportedOperationException("Cannot set power state: " + state.toString());
            }
        }
    }
946726
protected S state(S newState) {
        S oldState = state;
        state = newState;
        return oldState;
    }
849204
public static StateObj state(StateObj... states) {
        MutableStateObj mutable = mutable();
        for (StateObj state : states) {
            mutable.updateState(state);
        }
        return state(mutable.getState());
    }
980297
public void addState(GameState state) {
		states.put(new Integer(state.getID()), state);
		
		if (currentState.getID() == -1) {
			currentState = state;
		}
	}
234123
public void setEditingState(String state) {
		if ("idle".equalsIgnoreCase(state)) {
			delegate.setEditingState(GeometryEditState.IDLE);
		} else if ("dragging".equalsIgnoreCase(state)) {
			delegate.setEditingState(GeometryEditState.DRAGGING);
		} else if ("inserting".equalsIgnoreCase(state)) {
			delegate.setEditingState(GeometryEditState.INSERTING);
		}
	}
744437
public static EnumFacing getRealSide(IBlockState state, EnumFacing side)
	{
		if (state == null || side == null)
			return side;

		EnumFacing direction = DirectionalComponent.getDirection(state);
		if (direction == EnumFacing.SOUTH)
			return side;

		if (direction == EnumFacing.DOWN)
			return side.rotateAround(Axis.X);
		else if (direction == EnumFacing.UP)
			switch (side)
			{
				case UP:
					return EnumFacing.SOUTH;
				case DOWN:
					return EnumFacing.NORTH;
				case NORTH:
					return EnumFacing.UP;
				case SOUTH:
					return EnumFacing.DOWN;
				default:
					return side;
			}

		int count = EnumFacingUtils.getRotationCount(direction);
		side = EnumFacingUtils.rotateFacing(side, count);

		return side;
	}
554439
private void setState(final EvaluatorState toState) {
    while (true) {

      final EvaluatorState fromState = this.state.get();
      if (fromState == toState) {
        break;
      }

      if (!fromState.isLegalTransition(toState)) {
        LOG.log(Level.WARNING, "Illegal state transition: {0} -> {1}", new Object[] {fromState, toState});
        throw new IllegalStateException("Illegal state transition: " + fromState + " -> " + toState);
      }

      if (this.state.compareAndSet(fromState, toState)) {
        break;
      }
    }
  }
325021
protected final void setState(final int newState)
	{
		if (closing < 2) {
			//  detect and ignore order of arrival inversion for tunneling.ack/cEMI.con
			if (internalState == OK && newState == ClientConnection.CEMI_CON_PENDING)
				return;
			internalState = newState;
			if (updateState)
				state = newState;
		}
		else
			state = internalState = CLOSED;
	}
809607
public Iterable<DOAuth2User> queryByState(java.lang.Integer state) {
    return queryByField(null, DOAuth2UserMapper.Field.STATE.getFieldName(), state);
  }
1016421
public static WindowState getWindowState(String state) {
        if (state == null) {
            return null;
        }

        final WindowState windowState = WINDOW_STATES.get(state);
        if (windowState != null) {
            return windowState;
        }

        return new WindowState(state);
    }
1205124
public Vector4d rotateX(double angle, Vector4d dest) {
        double sin = Math.sin(angle), cos = Math.cosFromSin(sin, angle);
        double y = this.y * cos - this.z * sin;
        double z = this.y * sin + this.z * cos;
        dest.x = this.x;
        dest.y = y;
        dest.z = z;
        dest.w = this.w;
        return dest;
    }