Helper function for {@link #containsRef}, etc.
769823
protected static boolean contains (
        EqualityComparator eqc, Object[] list, Object element)
    {
        return (-1 != indexOf(eqc, list, element));
    }
689962
function contains(query, node, info) {
  if (!has(node, info.property)) {
    return false
  }

  return (
    normalizeValue(node.properties[info.property], info).indexOf(
      query.value
    ) !== -1
  )
}
875643
public final boolean contains(final int e) {
        for (int i = 0; i < size; ++i)
            if (list[i] == e) return true;
        return false;
    }
108877
private boolean containsAll(String s, int i) {
        if (i >= s.length()) {
            return true;
        }
        int  cp= UTF16.charAt(s, i);
        if (contains(cp) && containsAll(s, i+UTF16.getCharCount(cp))) {
            return true;
        }
        for (String setStr : strings) {
            if (s.startsWith(setStr, i) &&  containsAll(s, i+setStr.length())) {
                return true;
            }
        }
        return false;

    }
181365
public boolean contains(final T element) {
        if (element == null) {
            return false;
        }

        return lowerEndpoint.includes(element) && upperEndpoint.includes(element);
    }
1139363
function contains(value, elem) {
        if (validateHelpers.isArray(elem)) {
            for (var i = 0, len = elem.length; i < len; i += 1) {
                if (elem[i] === value) {
                    return true;
                }
            }
        }

        if (validateHelpers.isString(elem)) {
            return elem.indexOf(value) >= 0;
        }

        return false;
    }
572670
function contains(val) {
        var type = toString.call(val);
        if (map[type] === undefined)
            return false;

        var key = hash('' + val);
        if (map[type][key] === undefined)
            return false;

        var arr = map[type][key];
        for (var i = 0; i < arr.length; ++i) {
            if (arr[i] === val) return true;
        }

        return false;
    }
429763
public boolean contains(int s)
  {

    if (null == m_map)
      return false;

    for (int i = 0; i < m_firstFree; i++)
    {
      int node = m_map[i];

      if (node == s)
        return true;
    }

    return false;
  }
946818
protected boolean containsElem(int index, final T key, int hashCode) {
    for (LinkedElement<T> e = entries[index]; e != null; e = e.next) {
      // element found
      if (hashCode == e.hashCode && e.element.equals(key)) {
        return true;
      }
    }
    // element not found
    return false;
  }
513146
public static boolean contains(Saveable s) {
        for(BulkChange b=current(); b!=null; b=b.parent)
            if(b.saveable==s || b.saveable==ALL)
                return true;
        return false;
    }
698297
public static String getTypeFromRef(String ref) {
        Matcher matcher = match(ref);
        return matcher != null ? matcher.group(1) : null;
    }
820559
@Override
	public boolean contains(String key, String groupId, String templateId, String version) {
		doChacheEntry(key);

		return null != getCacheEntry(key);
	}
1126878
@Override
    public boolean contains(ArchivePath path) {
        Validate.notNull(path, "No path was specified");

        boolean found = content.containsKey(path);
        if (!found) {
            found = nestedContains(path);
        }
        return found;
    }
1011649
@SuppressWarnings("unchecked")
	public <E> TerminalResult CONTAINS_elements(E... value) {
		getPredicateExpression().setOperator(Operator.CONTAINS);
		getPredicateExpression().setValue_2(value);
		TerminalResult ret = APIAccess.createTerminalResult(this.getPredicateExpression());
		QueryRecorder.recordInvocation(this, "CONTAINS_elements", ret, QueryRecorder.placeHolder(value));
		return ret;
	}
944274
function _isRefNode(node) {
  return (
    node.nodeType
    && node.nodeType === 1
    && (node.hasAttribute('ref') || typeof node.__refString__ === 'string')
  );
}
298969
def contains_index(self):
        """"""
        if self._contains_index is None:
            max_t = 0
            for tkey in self.types:
                if self.types[tkey].end > max_t and not self.types[tkey].embedded:
                    max_t = self.types[tkey].end

            #Now we have a good first guess. Continue to iterate the next few lines
            #of the the refstring until we find a solid "CONTAINS" keyword. If there
            #are no types in the module, then max_t will be zero and we don't have
            #the danger of running into a contains keyword as part of a type. In that
            #case we can just keep going until we find it.
            i = 0
            start = self.linenum(max_t)[0]
            max_i = 10 if max_t > 0 else len(self._lines)

            while (self._contains_index is None and i < max_i
                   and start + i < len(self._lines)):
                iline = self._lines[start + i].lower()
                if "contains" in iline:
                    if '!' not in iline or (iline.index('!') > iline.index("contains")):
                        self._contains_index = start + i
                i += 1

            if self._contains_index is None:
                #There must not be a CONTAINS keyword in the module
                self._contains_index = len(self._lines)-1

        return self._contains_index
274231
public boolean contains(long index) {
    assertSegmentOpen();

    if (!validIndex(index))
      return false;

    // Check the memory index first for performance reasons.
    long offset = relativeOffset(index);
    return offsetIndex.contains(offset);
  }