Return True if the multiplex is active in the given state, false otherwise.
434595
def is_active(self, state: 'State') -> bool:
        
        # Remove the genes which does not contribute to the multiplex
        sub_state = state.sub_state_by_gene_name(*self.expression.variables)
        # If this state is not in the cache
        if sub_state not in self._is_active:
            params = self._transform_state_to_dict(sub_state)
            # We add the result of the expression for this state of the multiplex to the cache
            self._is_active[sub_state] = self.expression.evaluate(**params)
        return self._is_active[sub_state]
121450
protected function isState($state)
    {
        $current = $this->getState();

        return (is_array($state))
            ? in_array($current, $state)
            : $current == $state;
    }
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
333358
public function hasNextState()
	{
		return $this->cacheIndexMap[$this->owner->{$this->stateAttribute}] + 1 < count($this->stateConfig);
	}
899157
def check_state(self, pair, state):
        
        self.__log_info('Check %s %s -> %s', pair, pair.state, state)
        pair.state = state
789241
function matchesState(state, desiredState) {
  if (desiredState === 'all') {
    return true;
  }
  if (desiredState[0] === '!') {
    return state !== desiredState.substring(1);
  }
  return state === desiredState;
}
142250
def islive(self, state):
		''''''
		reachable = [state]
		i = 0
		while i < len(reachable):
			current = reachable[i]
			if current in self.finals:
				return True
			if current in self.map:
				for symbol in self.map[current]:
					next = self.map[current][symbol]
					if next not in reachable:
						reachable.append(next)
			i += 1
		return False
304344
public function getActiveStateFromChilds()
    {
        foreach ($this->getChilds() as $child) {
            if ($child->inactive()) {
                return false;
            } elseif ($child->isActive()) {
                return true;
            } elseif ($child->hasRoute() && $child->getActiveStateFromRoute()) {
                return true;
            } elseif ($child->getActiveStateFromUrl()) {
                return true;
            }
        }

        return false;
    }
120406
@Override
    public boolean isTransactionActive() {

        if (this.getTransactionManager() != null)
            try {
                if (this.getTransactionManager().getStatus() == Status.STATUS_ACTIVE)
                    return true;

            } catch (SystemException se) {
                if (TC.isDebugEnabled()) {
                    Tr.debug(TC, "Returning isTransactionActive() false: " + se.getMessage());
                }
                return false;
            }
        return false;
    }
406403
def is_active(self):
    """"""
    if not self._multiplexer:
      return False
    return bool(self._multiplexer.PluginRunToTagToContent(metadata.PLUGIN_NAME))
661295
def has_dirty_state_machine(self):
        
        for sm in self.state_machines.values():
            if sm.marked_dirty:
                return True
        return False
1303
def update_active(self):
        """"""
        if self.active is not None:
            self.update_state(self.active, "normal")
        if self.current_iid == self.active:
            self._active = None
            return
        self._active = self.current_iid
        if self.active is not None:
            self.update_state(self.active, "active")
1323012
def is_active(self):
    
    if not self._multiplexer:
      return False

    scalars_plugin_instance = self._get_scalars_plugin()
    if not (scalars_plugin_instance and
            scalars_plugin_instance.is_active()):
      return False

    # This plugin is active if any run has a layout.
    return bool(self._multiplexer.PluginRunToTagToContent(metadata.PLUGIN_NAME))
1180822
protected boolean hasOngoingTransaction() {
		if(!isSupervisedMode()) {
			return false;
		} else {
			if(ongoingTransactions != null) {
				for (Transaction transaction : ongoingTransactions) {
					if(TransactionState.CALLING.equals(transaction.getState()) ||
						TransactionState.TRYING.equals(transaction.getState()) ||
						TransactionState.PROCEEDING.equals(transaction.getState()) ||
						TransactionState.COMPLETED.equals(transaction.getState()) ||
						TransactionState.CONFIRMED.equals(transaction.getState())) {
							return true;
					}
				}
			}
			return false;
		}
	}
957011
public boolean containsSubflowState(final Flow flow, final String stateId) {
        if (containsFlowState(flow, stateId)) {
            return getState(flow, stateId, SubflowState.class) != null;
        }
        return false;
    }
519445
def is_active(self):
    """"""
    if self._db_connection_provider:
      # The plugin is active if one relevant tag can be found in the database.
      db = self._db_connection_provider()
      cursor = db.execute('''
        SELECT
          1
        FROM Tags
        WHERE Tags.plugin_name = ?
        LIMIT 1
      ''', (metadata.PLUGIN_NAME,))
      return bool(list(cursor))

    return bool(self._multiplexer) and any(self.index_impl().values())
806456
public function hasStateDirective($state, $directive)
    {
        $directive = strtolower($directive);
        return isset($this->stateDirectives[$state][$directive]);
    }