Returns True or False, depending on the existence of the named queue.
962532
def queue_exists(self, name):
        
        try:
            queue = self._manager.head(name)
            return True
        except exc.NotFound:
            return False
522527
private final boolean lookahead(String s, int n)
  {

    boolean isToken;

    if ((m_queueMark + n) <= m_ops.getTokenQueueSize())
    {
      String lookahead = (String) m_ops.m_tokenQueue.elementAt(m_queueMark + (n - 1));

      isToken = (lookahead != null) ? lookahead.equals(s) : (s == null);
    }
    else
    {
      isToken = (null == s);
    }

    return isToken;
  }
1319624
public function hasServer(string $name = null): bool
    {
        if (is_null($name)) {
            return $this->exists('server');
        }

        return $this->exists('server', $name);
    }
1040544
public boolean signal()
    {
        if (!hasWaiters())
            return false;
        while (true)
        {
            RegisteredSignal s = queue.poll();
            if (s == null || s.signal() != null)
                return s != null;
        }
    }
708814
def check_if_exists(self):
        """"""
        if self.req is None:
            return False
        try:
            self.satisfied_by = pkg_resources.get_distribution(self.req)
        except pkg_resources.DistributionNotFound:
            return False
        except pkg_resources.VersionConflict:
            self.conflicts_with = pkg_resources.get_distribution(self.req.project_name)
        return True
56232
public static boolean exists(Compiler c, String name, CompilationUnit from) {
        String fqName = getFullyQualifiedName(resolveName(name, from));
        try {
            c.loadClass(fqName);
            return true;
        }
        catch (ClassNotFoundException nx) {
            try {
                c.loadClass(resolveName(name, from));  // Try standard path as a last resort
                return true;
            }
            catch (ClassNotFoundException nx2) {
                return false;
            }
        }
    }
1034047
def exists(self):
        
        self_object = self.query.filter_by(id=self.id).first()
        if self_object is None:
            return False
        return True
362266
def has_port_by_name(self, port_name):
        ''''''
        with self._mutex:
            if self.get_port_by_name(port_name):
                return True
            return False
978781
def exists(self):
        
        try:
            queue = self.queue
            queue.queue_declare(passive=True)
        except NotFound:
            return False
        except ChannelError as e:
            if e.reply_code == '404':
                return False
            raise e
        return True
1229206
def _check_existence_by_collection(self, container, item_name):
        '''
        '''

        coll = container.get_collection()
        for item in coll:
            if item.name == item_name:
                return True
        return False
1016269
def show(self, qname):
        '''
        
        '''
        try:
            # First if not exists() -> exit
            if not self.conn.queue_exists(qname):
                return {}
            # If exist, search the queue to return the Queue Object
            for queue in self.conn.list():
                if queue.name == qname:
                    return queue
        except pyrax.exceptions as err_msg:
            log.error('RackSpace API got some problems during existing'
                      ' queue check: %s', err_msg)
        return {}
472106
function find(queue, name) {
  const out = queue.findIndex(e => e.name === name);
  if (out === -1) {
    throw new Error(`${name}: Could not find this function`);
  }

  return out;
}
842246
boolean containsClose() {
        synchronized (reqQueueLockObject) {
            for (ServerRequest req : queue) {
                if (req != null &&
                        req.getRequestPath().equals(Defines.RequestPath.RegisterClose.getPath())) {
                    return true;
                }
            }
        }
        return false;
    }
800783
def busy?
      busy = false
      @mutex.synchronize { busy = @thread_name_to_queue.any? { |_, q| q.busy? } }
      busy
    end
526500
protected function need_to_update_queue($queue_name)
    {
        foreach ($this->getCurrentSubscribers($queue_name) as $subscriber) {
            if ($subscriber->url == $this->subscriber_url)
                return false;
        }
        return true;
    }
456581
def exists(Name, region=None, key=None, keyid=None, profile=None):
    '''
    
    '''
    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)

    try:
        events = conn.list_rules(NamePrefix=Name)
        if not events:
            return {'exists': False}
        for rule in events.get('Rules', []):
            if rule.get('Name', None) == Name:
                return {'exists': True}
        return {'exists': False}
    except ClientError as e:
        err = __utils__['boto3.get_error'](e)
        return {'error': err}
24194
public static function exists( string $name ): bool
	{
		if( $name === "@core" )
		{
			return true;
		}

		try {
			$row = self::getModuleScheme($name, false, ["id"]);
		}
		catch(NotFoundException $e) {
			return false;
		}

		return $row->id > 0;
	}