Check if inputs are enough to define state
550697
def calculable(self):
        """"""
        self._mode = ""
        if self.kwargs["T"] and self.kwargs["P"]:
            self._mode = "TP"
        elif self.kwargs["T"] and self.kwargs["rho"]:
            self._mode = "Trho"
        elif self.kwargs["T"] and self.kwargs["h"] is not None:
            self._mode = "Th"
        elif self.kwargs["T"] and self.kwargs["s"] is not None:
            self._mode = "Ts"
        elif self.kwargs["T"] and self.kwargs["u"] is not None:
            self._mode = "Tu"
        elif self.kwargs["P"] and self.kwargs["rho"]:
            self._mode = "Prho"
        elif self.kwargs["P"] and self.kwargs["h"] is not None:
            self._mode = "Ph"
        elif self.kwargs["P"] and self.kwargs["s"] is not None:
            self._mode = "Ps"
        elif self.kwargs["P"] and self.kwargs["u"] is not None:
            self._mode = "Pu"
        elif self.kwargs["rho"] and self.kwargs["h"] is not None:
            self._mode = "rhoh"
        elif self.kwargs["rho"] and self.kwargs["s"] is not None:
            self._mode = "rhos"
        elif self.kwargs["rho"] and self.kwargs["u"] is not None:
            self._mode = "rhou"
        elif self.kwargs["h"] is not None and self.kwargs["s"] is not None:
            self._mode = "hs"
        elif self.kwargs["h"] is not None and self.kwargs["u"] is not None:
            self._mode = "hu"
        elif self.kwargs["s"] is not None and self.kwargs["u"] is not None:
            self._mode = "su"
        elif self.kwargs["T"] and self.kwargs["x"] is not None:
            self._mode = "Tx"
        elif self.kwargs["P"] and self.kwargs["x"] is not None:
            self._mode = "Px"
        return bool(self._mode)
738071
public static void checkState(boolean b, String msg, long arg1, long arg2, long arg3, long arg4) {
        if (!b) {
            throwStateEx(msg, arg1, arg2, arg3, arg4);
        }
    }
169349
protected void checkState(InitializedState minState, InitializedState maxState) {
        PreconditionUtil.verify(initializedState.ordinal() >= minState.ordinal(), "not yet initialized, cannot yet be called");
        PreconditionUtil
                .verify(initializedState.ordinal() <= maxState.ordinal(), "already initialized, cannot be called anymore");
    }
899863
function check_input(input, message) {
  if (!input) {
    error('\n  Error: ' + message);
    program.outputHelp(colors.red);
    process.exit(1);
  }
}
477775
def check_state(self, token):
        
        # print "zip", self.zip
        if len(token) == 2 and self.state is None:
            if token.capitalize() in self.parser.states.keys():
                self.state = self._clean(self.parser.states[token.capitalize()])
                return True
            elif token.upper() in self.parser.states.values():
                self.state = self._clean(token.upper())
                return True
        if self.state is None and self.street_suffix is None and len(self.comma_separated_address) > 1:
            if token.capitalize() in self.parser.states.keys():
                self.state = self._clean(self.parser.states[token.capitalize()])
                return True
            elif token.upper() in self.parser.states.values():
                self.state = self._clean(token.upper())
                return True
        return False
783242
def _state(self, variable, num):
        

        value = getattr(self, variable)

        if value is None:
            return False

        if value is True:
            return True

        if random.randint(1, num) == num:
            setattr(self, variable, True)
            return True

        return False
913094
def initialize_state?(object)
      value = read(object, :state)
      (value.nil? || value.respond_to?(:empty?) && value.empty?) && !states[value, :value]
    end
676257
def check(
    state,
    unused=False,
    style=False,
    ignore=None,
    args=None,
    **kwargs
):
    """"""
    from ..core import do_check

    do_check(
        three=state.three,
        python=state.python,
        system=state.system,
        unused=unused,
        ignore=ignore,
        args=args,
        pypi_mirror=state.pypi_mirror,
    )
949079
def valid_state?(event_name)
      current_states = events_map.states_for(event_name)
      current_states.any? { |state| state == current || state == ANY_STATE }
    end
899157
def check_state(self, pair, state):
        
        self.__log_info('Check %s %s -> %s', pair, pair.state, state)
        pair.state = state
698996
private boolean validate(ConsoleReaderWrapper consoleReaderWrapper, String input) {
        Iterable<String> errors = validate(input);
        if (!Iterables.isEmpty(errors)) {
            consoleReaderWrapper.beep();
            for (String error : errors) {
                consoleReaderWrapper.print(error);
            }
            return false;
        } else {
            return true;
        }
    }
820429
boolean checkInputDependencyConstraints() {
		if (getInputDependencyConstraint() == InputDependencyConstraint.ANY) {
			// InputDependencyConstraint == ANY
			return IntStream.range(0, inputEdges.length).anyMatch(this::isInputConsumable);
		} else {
			// InputDependencyConstraint == ALL
			return IntStream.range(0, inputEdges.length).allMatch(this::isInputConsumable);
		}
	}
1289076
def validate(input)
      (check_exists(required_inputs, input) &&
        check_format(input_formats, input)) || 
      (raise Errors::InvalidInput, "Invalid input for #{self.class.name}")
    end
530416
def can_be_(self, state):
    """"""
    translator = self._meta['translator']
    state = translator.translate(state)

    if self._meta['complete']:
        return True

    if self.actual_state is None:
        return True

    transitions = self._meta['transitions'][self.actual_state]
    return state in transitions
259468
def handle_input(self):
        """"""
        difference = self.check_state()
        if not difference:
            return
        self.events = []
        self.handle_new_events(difference)
        self.update_timeval()
        self.events.append(self.sync_marker(self.timeval))
        self.write_to_pipe(self.events)
662895
def _setup_states(state_definitions, prev=()):
    """"""
    states = list(prev)
    for state_def in state_definitions:
        if len(state_def) != 2:
            raise TypeError(
                "The 'state' attribute of a workflow should be "
                "a two-tuple of strings; got %r instead." % (state_def,)
            )
        name, title = state_def
        state = State(name, title)
        if any(st.name == name for st in states):
            # Replacing an existing state
            states = [state if st.name == name else st for st in states]
        else:
            states.append(state)
    return StateList(states)
430172
public boolean hasState(ConversationState... states) {
		for (ConversationState s : states) {
			if (s.equals(state)) {
				return true;
			}
		}
		return false;
	}