All members of a keyGroup share the same getCursor on the itemStream, which
uses this method to filter the items. This allows us to see if an item matches
ANY of the members of the group.
181384
public boolean filterMatches(AbstractItem item)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "filterMatches", item);

    boolean match = false;
    LocalQPConsumerKey matchingMember = null;

    // Hopefully we have a general consumer so we don't need to parse the message
    if(generalMemberCount > 0)
    {
      // We have a match but we don't care which one out of the general members
      // actually takes the message, so if one of the general members is the one
      // performing the scan they can take the message.
      matchingMember = null;
      match = true;
    }
    // Damn, all we've got are members with selectors, we'll have to parse the message
    else
    {
      // If there is just the single member see if they match the message
      if(singleMember != null)
      {
        if(singleMember.filterMatches(item))
        {
          match = true;
          matchingMember = singleMember;
        }
      }
      // Otherwise we give all the members a chance to match it
      else
      {
        LocalQPConsumerKey keyMember;
        int index;
        int size = specificKeyMembers.size();
        for(index = 0;
            (index < size) && !match;
            index++)
        {
          keyMember = specificKeyMembers.get(index);
          // Drop out if one of the members matches it
          if(keyMember.filterMatches(item))
          {
            match = true;
            matchingMember = keyMember;
          }
        }
      }
    }

//  we only want to remember this result if get got here as a result of a consumer
    //asking for a message.
    boolean onConsumerThread = consumerThreadActive &&
                               (Thread.currentThread().getId() == consumerThreadID);

    if(onConsumerThread)
    {
      currentMatch = match;
      currentMatchingMember = matchingMember;
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "filterMatches", new Object[] {Boolean.valueOf(match), matchingMember});

    return match;
  }
809183
def _hasAttrGroupMember(self, attrGroup, attr):
        
        method_name = '%s_%s' % (attrGroup, attr)
        return hasattr(self, method_name)
868078
def get_cgroup_item(self, key):
        
        value = _lxc.Container.get_cgroup_item(self, key)

        if value is False:
            return False
        else:
            return value.rstrip("\n")
49660
function getItemDefinedGroups() {
			var groups = {},
				itemName, item, itemToolbar, group, order;

			for ( itemName in editor.ui.items ) {
				item = editor.ui.items[ itemName ];
				itemToolbar = item.toolbar || 'others';
				if ( itemToolbar ) {
					// Break the toolbar property into its parts: "group_name[,order]".
					itemToolbar = itemToolbar.split( ',' );
					group = itemToolbar[ 0 ];
					order = parseInt( itemToolbar[ 1 ] || -1, 10 );

					// Initialize the group, if necessary.
					groups[ group ] || ( groups[ group ] = [] );

					// Push the data used to build the toolbar later.
					groups[ group ].push( { name: itemName, order: order } );
				}
			}

			// Put the items in the right order.
			for ( group in groups ) {
				groups[ group ] = groups[ group ].sort( function( a, b ) {
					return a.order == b.order ? 0 :
						b.order < 0 ? -1 :
						a.order < 0 ? 1 :
						a.order < b.order ? -1 :
						1;
				} );
			}

			return groups;
		}
55904
public boolean filterMatches(AbstractItem item)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "filterMatches", item);

    boolean result = true;

    if (_selectorTree != null || _discriminatorTree != null)
    { 
      SIMPMessage msg = (SIMPMessage) item;
      // Defect 382250, set the unlockCount from MsgStore into the message
      // in the case where the message is being redelivered.
      // 668676, get the message if available
      JsMessage jsMsg = msg.getMessageIfAvailable();
      if ( msg == null)
      {
    	  result = false;
      }
      else
      {
          int redelCount = msg.guessRedeliveredCount();
           
          if (redelCount > 0)
          {
              if(TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                  SibTr.debug(tc, "Set deliverycount into message: " + redelCount);          
              jsMsg.setDeliveryCount(redelCount);
          }
          // Evaluate message against selector tree
          result =
              _messageProcessor.getMessageProcessorMatching().evaluateMessage(
              _selectorTree,
              _discriminatorTree,
              jsMsg);
      }
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "filterMatches", new Boolean(result));
    return result;

  }
873622
@Override
    public boolean isItemExist(Map<String, String> item) throws WidgetException {
        try {
            List<Map<String, String>> tableData = getTableDataInMap();
            for (Map<String, String> rowData : tableData) {
                boolean found = true;
                for (Map.Entry<String, String> expectedEntry : item.entrySet()) {
                    String actual = rowData.get(expectedEntry.getKey());

                    if (!actual.equals(expectedEntry.getValue())) {
                        found = false;
                    }
                }

                if (found) {
                    return true;
                }
            }

            return false;
        } catch (Exception e) {
            throw new WidgetException("Error while determining whether item " + item
                    + " exists in table", generateXPathLocator(), e);
        }
    }
693069
public String get(String group, String key) {
		return this.groupedMap.get(group, key);
	}
980237
public T match(Collection<I> items)
    {
        for (I item : items)
        {
            T match = match(item);
            if (match != null)
            {
                return match;
            }
        }
        return null;
    }
868357
@Override
    public IEntityGroup find(String key) throws GroupsException {

        if (isTreeRefreshRequired()) {
            refreshTree();
        }

        log.debug("Invoking find() for key:  {}", key);

        // All of our groups (incl. ROOT_GROUP)
        // are indexed in the 'groups' map by key...
        return groupsTree.getGroups().get(key);
    }
279482
public static <T extends Key <T>> GroupMatcher <T> groupContains (final String compareTo)
  {
    return new GroupMatcher <> (compareTo, StringOperatorName.CONTAINS);
  }
580900
def _group_similar(items: List[T],
                   comparer: Callable[[T, T], bool]) -> List[List[T]]:
    
    groups = []  # type: List[List[T]]
    used = set()  # type: Set[int]
    for i in range(len(items)):
        if i not in used:
            group = [items[i]]
            for j in range(i + 1, len(items)):
                if j not in used and comparer(items[i], items[j]):
                    used.add(j)
                    group.append(items[j])
            groups.append(group)
    return groups
1093339
private static ItemGroup<?> getBaseGroup(BlueOrganization org) {
        ItemGroup<?> group = null;
        if (org != null && org instanceof AbstractOrganization) {
            group = ((AbstractOrganization) org).getGroup();
        }
        return group;
    }
48955
private ByteBuffer getRawKeyFromRowGroupOrNull(Iterable<Row> filteredRowGroup) {
        Iterator<Row> iter = filteredRowGroup.iterator();
        return iter.hasNext() ? getKey(iter.next()) : null;
    }
1084736
public void onItemGroup(ItemGroup<?> group) {
        for (Item i : group.getItems())
            if (i.hasPermission(Item.READ))
                onItem(i);
    }
1062756
def _gotitem(self, key, ndim, subset=None):
        
        self._set_binner()
        grouper = self.grouper
        if subset is None:
            subset = self.obj
        grouped = groupby(subset, by=None, grouper=grouper, axis=self.axis)

        # try the key selection
        try:
            return grouped[key]
        except KeyError:
            return grouped
168982
public final ItemStream findFirstMatchingItemStream(Filter filter) throws MessageStoreException 
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "findFirstMatchingItemStream", filter);

        ItemStream item = (ItemStream) _itemStreams.findFirstMatching(filter);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "findFirstMatchingItemStream", item);
        return item;
    }
684084
protected WsGroup findGroupFromKey(String key) {
        WsGroup wsGroup = null;

        if (key != null) {

            GcFindGroups gcFindGroups = new GcFindGroups();
            gcFindGroups.addGroupName(key);
            WsFindGroupsResults results = gcFindGroups.execute();

            // if no results were returned, return null
            if (results != null
                    && results.getGroupResults() != null
                    && results.getGroupResults().length > 0) {

                if (LOGGER.isDebugEnabled()) {
                    LOGGER.debug(
                            "found group from key " + key + ": " + results.getGroupResults()[0]);
                }

                wsGroup = results.getGroupResults()[0];
            }
        }

        return wsGroup;
    }