Check if the XMPP entity this roster belongs to is subscribed to the presence of the given JID.

@param jid the jid to check.
@return <code>true</code> if we are subscribed to the presence of the given jid.
@since 4.2
548878
public boolean iAmSubscribedTo(Jid jid) {
        if (jid == null) {
            return false;
        }
        BareJid bareJid = jid.asBareJid();
        RosterEntry entry = getEntry(bareJid);
        if (entry == null) {
            return false;
        }
        return entry.canSeeHisPresence();
    }
1096064
@Override
    public boolean isPresent(int accessor) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            JmfTr.entry(this, tc, "isPresent", new Object[] { Integer.valueOf(accessor) });

        boolean result;
        checkIndex(accessor);

        synchronized (getMessageLockArtefact()) {
            if (cache[accessor] != null) {
                if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                    JmfTr.exit(this, tc, "isPresent", Boolean.TRUE);
                return true;
            }

            // If it's not in the cache and the message isn't assembled it can't be present
            if (contents == null) {
                if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                    JmfTr.exit(this, tc, "isPresent", Boolean.FALSE);
                return false;
            }

            // For an assembled message, the subclass's getFieldDef method should answer the question.
            result = getFieldDef(accessor, true) != null;
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            JmfTr.exit(this, tc, "isPresent", Boolean.valueOf(result));
        return result;
    }
1144515
boolean contains(ProtoMember protoMember) {
    if (protoMember == null) throw new NullPointerException("protoMember == null");
    if (identifierSet.excludes(protoMember)) return false;
    return members.containsKey(protoMember.type())
        ? members.containsEntry(protoMember.type(), protoMember)
        : types.contains(protoMember.type());
  }
1029226
public boolean areEntityCapsSupported(Jid jid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
        return sdm.supportsFeature(jid, NAMESPACE);
    }
1364086
public boolean isAffiliationModification() {
        if (jid != null && affiliation != null) {
            assert (node == null && namespace == AffiliationNamespace.owner);
            return true;
        }
        return false;
    }
307253
public boolean isUbiqueInBothContexts(PhysicalEntity pe)
	{
		String id = getSMRID(pe);
		return id != null && isUbiqueInBothContexts(id);
	}
357402
public final boolean isStatefulSessionBean(BeanId id) {
        boolean result = id.getHome().isStatefulSessionHome();
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(tc, "isStatefulSessionBean : " + result + ", " + id);
        return result;
    }
433825
public boolean destinationExists(JsDestinationAddress addr) throws SIMPNullParameterException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "destinationExists", new Object[] { addr });

        // Now look for the destination in the hash table
        boolean exists = destinationExists(addr.getDestinationName(), addr.getBusName());

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "destinationExists", new Boolean(exists));

        return exists;
    }
328374
public synchronized void registerJmxIfRequired() {
        referenceCount++;
        if(isRegistered == false) {
            String domain = JmxUtils.getPackageName(this.getClass());
            this.jmxObjectName = JmxUtils.createObjectName(domain, this.name);
            JmxUtils.registerMbean(this, this.jmxObjectName);
            isRegistered = true;
        }
    }
829506
@GetMapping(value = "/{entityTypeId}/exist", produces = APPLICATION_JSON_VALUE)
  public boolean entityExists(@PathVariable("entityTypeId") String entityTypeId) {
    return dataService.hasRepository(entityTypeId);
  }
197010
protected boolean isSuccessor(NodeData mergeVersion, NodeData corrVersion) throws RepositoryException
   {
      SessionDataManager mergeDataManager = mergeSession.getTransientNodesManager();

      PropertyData successorsProperty =
         (PropertyData)mergeDataManager.getItemData(mergeVersion, new QPathEntry(Constants.JCR_SUCCESSORS, 0),
            ItemType.PROPERTY);

      if (successorsProperty != null)
      {
         for (ValueData sv : successorsProperty.getValues())
         {
            String sidentifier = ValueDataUtil.getString(sv);

            if (sidentifier.equals(corrVersion.getIdentifier()))
            {
               return true; // got it
            }

            // search in successors of the successor
            NodeData successor = (NodeData)mergeDataManager.getItemData(sidentifier);
            if (successor != null)
            {
               if (isSuccessor(successor, corrVersion))
               {
                  return true;
               }
            }
            else
            {
               throw new RepositoryException("Merge. Ssuccessor is not found by uuid " + sidentifier + ". Version "
                  + mergeSession.getLocationFactory().createJCRPath(mergeVersion.getQPath()).getAsString(false));
            }
         }
         // else it's a end of version graph node
      }

      return false;
   }
258655
public JingleSession getSession(String jid) {
        for (JingleSession jingleSession : jingleSessions) {
            if (jingleSession.getResponder().equals(jid)) {
                return jingleSession;
            }
        }
        return null;
    }
828373
public boolean hasComponent(int blockId) {
        for (int i = 0; i < length; i++) {
            if (blockIdList[i] == blockId) {
                return true;
            }
        }
        return false;
    }
892582
@Override
    @RequestCache
    public boolean canPrincipalSubscribe(
            IAuthorizationPrincipal principal, String portletDefinitionId) {
        String owner = IPermission.PORTAL_SUBSCRIBE;

        // retrieve the indicated channel from the channel registry store and
        // determine its current lifecycle state
        IPortletDefinition portlet =
                this.portletDefinitionRegistry.getPortletDefinition(portletDefinitionId);
        if (portlet == null) {
            return false;
        }

        String target = PermissionHelper.permissionTargetIdForPortletDefinition(portlet);

        PortletLifecycleState state = portlet.getLifecycleState();

        /*
         * Each channel lifecycle state now has its own subscribe permission.  The
         * following logic checks the appropriate permission for the lifecycle.
         */
        String permission;
        if (state.equals(PortletLifecycleState.PUBLISHED)
                || state.equals(PortletLifecycleState.MAINTENANCE)) {
            // NB:  There is no separate SUBSCRIBE permission for MAINTENANCE
            // mode;  everyone simply sees the 'out of service' message
            permission = IPermission.PORTLET_SUBSCRIBER_ACTIVITY;
        } else if (state.equals(PortletLifecycleState.APPROVED)) {
            permission = IPermission.PORTLET_SUBSCRIBER_APPROVED_ACTIVITY;
        } else if (state.equals(PortletLifecycleState.CREATED)) {
            permission = IPermission.PORTLET_SUBSCRIBER_CREATED_ACTIVITY;
        } else if (state.equals(PortletLifecycleState.EXPIRED)) {
            permission = IPermission.PORTLET_SUBSCRIBER_EXPIRED_ACTIVITY;
        } else {
            throw new AuthorizationException(
                    "Unrecognized lifecycle state for channel " + portletDefinitionId);
        }

        // Test the appropriate permission.
        return doesPrincipalHavePermission(principal, owner, permission, target);
    }
1041183
private synchronized boolean isQueueEmptyForSessionId (final short sessionId) {
     if (tc.isEntryEnabled()) SibTr.entry(this, tc, "isQueueEmptyForSessionId", "sessionId="+sessionId);

     boolean empty = true;
     final Iterator it = queue.iterator();
     while(it.hasNext()) {
       final QueueData data = (QueueData)it.next();
       final ProxyQueue pq = data.getProxyQueue();
       if (pq.getId() == sessionId) {
         if (tc.isDebugEnabled()) SibTr.debug(this, tc, "Found match: ", pq);
         empty = false;
         break;
       }
     }

     if (tc.isEntryEnabled()) SibTr.exit(this, tc, "isQueueEmptyForSessionId", Boolean.valueOf(empty));
     return empty;
   }
273851
def is_member(self, m):
        """"""
        if not m:
            return False
        elif isinstance(m, basestring):
            jid = m
        else:
            jid = m['JID']

        is_member = len(filter(lambda m: m['JID'] == jid and m.get('STATUS') in ('ACTIVE', 'INVITED'), self.params['MEMBERS'])) > 0

        return is_member
1245635
public boolean isSubscribe() {
    if (message == null) {
      return false;
    }

    return (((Request) message).getMethod().equals(Request.SUBSCRIBE));
  }