True if an occurrence set contains any element overlapping
with the param occurrence.

@param theOcc
@param theOccCollection
@return
19376
public static boolean hasOverlappingOffsets(TermOccurrence theOcc, Collection<TermOccurrence> theOccCollection) {
		for(TermOccurrence o:theOccCollection)
			if(areOffsetsOverlapping(theOcc, o))
				return true;
		return false;
	}
994368
public boolean contains(Mention mention)
    {
        return sentence.equals(mention.sentence) && start <= mention.start && end >= mention.end;
    }
34737
def overlaps(self,junc,tolerance=0):
    """"""
    if not self.left.overlaps(junc.left,padding=tolerance): return False
    if not self.right.overlaps(junc.right,padding=tolerance): return False
    return True
830789
private static boolean checkCollectionMembers(Collection<?> c, Class<?> type) {
        for (Object element : c) {
            if (element != null && !type.isInstance(element)) {
                return false;
            }
        }
        return true;
    }
596056
public final void containsNoneIn(Iterable<?> excluded) {
    Collection<?> actual = iterableToCollection(actual());
    Collection<Object> present = new ArrayList<>();
    for (Object item : Sets.newLinkedHashSet(excluded)) {
      if (actual.contains(item)) {
        present.add(item);
      }
    }
    if (!present.isEmpty()) {
      failWithoutActual(
          fact("expected not to contain any of", annotateEmptyStrings(excluded)),
          fact("but contained", annotateEmptyStrings(present)),
          fullContents());
    }
  }
1071780
public boolean contains(MappeableContainer subset) {
    if(subset instanceof MappeableRunContainer) {
      return contains((MappeableRunContainer)subset);
    } else if(subset instanceof MappeableArrayContainer) {
      return contains((MappeableArrayContainer) subset);
    } else if(subset instanceof MappeableBitmapContainer){
      return contains((MappeableBitmapContainer)subset);
    }
    return false;
  }
551320
public boolean containsAll(UnicodeSet b) {
        // The specified set is a subset if all of its pairs are contained in
        // this set. This implementation accesses the lists directly for speed.
        // TODO: this could be faster if size() were cached. But that would affect building speed
        // so it needs investigation.
        int[] listB = b.list;
        boolean needA = true;
        boolean needB = true;
        int aPtr = 0;
        int bPtr = 0;
        int aLen = len - 1;
        int bLen = b.len - 1;
        int startA = 0, startB = 0, limitA = 0, limitB = 0;
        while (true) {
            // double iterations are such a pain...
            if (needA) {
                if (aPtr >= aLen) {
                    // ran out of A. If B is also exhausted, then break;
                    if (needB && bPtr >= bLen) {
                        break;
                    }
                    return false;
                }
                startA = list[aPtr++];
                limitA = list[aPtr++];
            }
            if (needB) {
                if (bPtr >= bLen) {
                    // ran out of B. Since we got this far, we have an A and we are ok so far
                    break;
                }
                startB = listB[bPtr++];
                limitB = listB[bPtr++];
            }
            // if B doesn't overlap and is greater than A, get new A
            if (startB >= limitA) {
                needA = true;
                needB = false;
                continue;
            }
            // if B is wholy contained in A, then get a new B
            if (startB >= startA && limitB <= limitA) {
                needA = false;
                needB = true;
                continue;
            }
            // all other combinations mean we fail
            return false;
        }

        if (!strings.containsAll(b.strings)) return false;
        return true;
    }
1247675
public boolean contains(Object o) {
    Iterator<E> iter = iterator();
    while (iter.hasNext()) {
      if (iter.next() == o) {
        return true;
      }
    }
    return false;
  }
223738
@Override
    public final boolean containsAll(Collection<?> c) {
        // Short circuit with size comparison first
        final int size = this.size();
        if (size == 0 || size < c.size()) {
            return false;
        }

        for (final Object o : c) {
            @SuppressWarnings("unchecked")
            final K key = this.getElementKey((T) o);
            final Queue<T> queue = this.keyedQueues.get(key);
            if (queue == null || !queue.contains(o)) {
                return false;
            }
        }

        return true;
    }
1242163
def contains(self, x, ctrs, kdtree=None):
        """"""

        return self.overlap(x, ctrs, kdtree=kdtree) > 0
817240
@Override
	@SuppressWarnings("unchecked")
	public boolean addAll(Collection<? extends E> c) {
		if(c.isEmpty()) return false;
		if(c instanceof Set) return addAll((Set<? extends E>)c);
		else throw new UnsupportedOperationException("May only add sets");
	}
885739
@Override
	public boolean addAll(Collection<? extends E> c) {
		if(c.isEmpty()) return false;
		combine();
		if(combined==null) {
			combined = new HashSet<>(c);
			return true;
		} else {
			return combined.addAll(c);
		}
	}
104957
public static boolean matches(Pattern patternMatcher, Object... elements)
    {
        if (patternMatcher == null) {
            return true;
        }

        for (Object element : elements) {
            if (matches(patternMatcher, element)) {
                return true;
            }
        }

        return false;
    }
414405
public static boolean isCollectionOfType(TypeName typeName, TypeName elementTypeName) {
		return isAssignable(typeName, Collection.class)
				&& isEquals(((ParameterizedTypeName) typeName).typeArguments.get(0), elementTypeName);
	}
950968
public void addAll(Collection<? extends E> c) {
        for (E element : c)
            add(element);
    }

    /**
     * Returns true if the element could have been inserted into the Bloom filter.
     * Use getFalsePositiveProbability() to calculate the probability of this
     * being correct.
     *
     * @param element element to check.
     * @return true if the element could have been inserted into the Bloom filter.
     */
    public boolean contains(E element) {
       long hash;
       String valString = element.toString();
       for (int x = 0; x < k; x++) {
           hash = createHash(valString + Integer.toString(x));
           hash = hash % (long)bitSetSize;
           if (!bitset.get(Math.abs((int)hash)))
               return false;
       }
       return true;
    }

    /**
     * Returns true if all the elements of a Collection could have been inserted
     * into the Bloom filter. Use getFalsePositiveProbability() to calculate the
     * probability of this being correct.
     * @param c elements to check.
     * @return true if all the elements in c could have been inserted into the Bloom filter.
     */
    public boolean containsAll(Collection<? extends E> c) {
        for (E element : c)
            if (!contains(element))
                return false;
        return true;
    }

    /**
     * Read a single bit from the Bloom filter.
     * @param bit the bit to read.
     * @return true if the bit is set, false if it is not.
     */
    public boolean getBit(int bit) {
        return bitset.get(bit);
    }

    /**
     * Set a single bit in the Bloom filter.
     * @param bit is the bit to set.
     * @param value If true, the bit is set. If false, the bit is cleared.
     */
    public void setBit(int bit, boolean value) {
        bitset.set(bit, value);
    }

    /**
     * Return the bit set used to store the Bloom filter.
     * @return bit set representing the Bloom filter.
     */
    public BitSet getBitSet() {
        return bitset;
    }

    /**
     * Returns the number of bits in the Bloom filter. Use count() to retrieve
     * the number of inserted elements.
     *
     * @return the size of the bitset used by the Bloom filter.
     */
    public int size() {
        return this.bitSetSize;
    }

    /**
     * Returns the number of elements added to the Bloom filter after it
     * was constructed or after clear() was called.
     *
     * @return number of elements added to the Bloom filter.
     */
    public int count() {
        return this.numberOfAddedElements;
    }

    /**
     * Returns the expected number of elements to be inserted into the filter.
     * This value is the same value as the one passed to the constructor.
     *
     * @return expected number of elements.
     */
    public int getExpectedNumberOfElements() {
        return expectedNumberOfFilterElements;
    }

    /**
     * Get expected number of bits per element when the Bloom filter is full. This value is set by the constructor
     * when the Bloom filter is created. See also getBitsPerElement().
     *
     * @return expected number of bits per element.
     */
    public double getExpectedBitsPerElement() {
        return this.bitsPerElement;
    }

    /**
     * Get actual number of bits per element based on the number of elements that have currently been inserted and the length
     * of the Bloom filter. See also getExpectedBitsPerElement().
     *
     * @return number of bits per element.
     */
    public double getBitsPerElement() {
        return this.bitSetSize / (double)numberOfAddedElements;
    }
}
837937
@Override
    public boolean contains(IAtomContainer ring) {
        for (int i = 0; i < getAtomContainerCount(); i++) {
            if (ring == getAtomContainer(i)) {
                return true;
            }
        }
        return false;
    }
309570
public final void contains(@NullableDecl Object element) {
    if (!Iterables.contains(actual(), element)) {
      List<Object> elementList = newArrayList(element);
      if (hasMatchingToStringPair(actual(), elementList)) {
        failWithoutActual(
            fact("expected to contain", element),
            fact("an instance of", objectToTypeName(element)),
            simpleFact("but did not"),
            fact(
                "though it did contain",
                countDuplicatesAndAddTypeInfo(
                    retainMatchingToString(actual(), elementList /* itemsToCheck */))),
            fullContents());
      } else {
        failWithActual("expected to contain", element);
      }
    }
  }