Returns {@code true} if {@code iterator} contains {@code element}.
500558
public static boolean contains(Iterator<?> iterator, @Nullable Object element) {
    return any(iterator, equalTo(element));
  }
821316
@SuppressWarnings("unchecked")
    public static Iterator<Element> elementIterator(Element element, String name) {

        return element.elementIterator(name);
    }
923445
public static boolean containsAllTrueElements(boolean[] arra,
            boolean[] arrb) {

        for (int i = 0; i < arra.length; i++) {
            if (arrb[i] && !arra[i]) {
                return false;
            }
        }

        return true;
    }
413076
def contains(self, element, key=lambda x: x):
        
        return self.select(key).any(lambda x: x == key(element))
1144607
function contains( element, className ) {
  className = className.replace( '.', '' );
  if ( hasClassList ) {
    return element.classList.contains( className );
  }

  return element.className.indexOf( className ) > -1;
}
587124
public boolean remove(T element) {
		for (Iterator<Node<T>> it = nodes.iterator(); it.hasNext(); )
			if (ObjectUtil.equalsOrNull(it.next().element, element)) {
				it.remove();
				return true;
			}
		return false;
	}
752053
public boolean hasNext() {

        // for chained iterators
        if (chained) {
            if (it1 == null) {
                if (it2 == null) {
                    return false;
                }

                if (it2.hasNext()) {
                    return true;
                }

                it2 = null;

                return false;
            } else {
                if (it1.hasNext()) {
                    return true;
                }

                it1 = null;

                return hasNext();
            }
        }

        // for other interators
        if (elements == null) {
            return false;
        }

        for (; notNull && i < elements.length && elements[i] == null; i++) {}

        if (i < elements.length) {
            return true;
        } else {

            // release elements for garbage collection
            elements = null;

            return false;
        }
    }
1086763
public Iterator<ElementType> iterator() {
        return new Iterator<ElementType>() {
            int idx = getIdx;
            int N = size;

            public boolean hasNext() {
                return N > 0;
            }

            public ElementType next() {
                ElementType x = (ElementType) elements[idx];
                idx = (idx + 1) % elements.length;
                N--;
                return x;
            }

            public void remove() {
                throw new UnsupportedOperationException("remove");
            }
        };
    }
1292800
public boolean hasAncestor(ElementBase element) {
        ElementBase child = this;
        
        while (child != null) {
            if (element.hasChild(child)) {
                return true;
            }
            child = child.getParent();
        }
        
        return false;
    }
395943
public boolean contains(final T element) {
        if (element == null) {
            return false;
        }
        return comparator.compare(element, minimum) > -1 && comparator.compare(element, maximum) < 1;
    }
942737
public boolean containsExplicitExceptions() {
        for (ThrownExceptionIterator i = iterator(); i.hasNext();) {
            i.next();
            if (i.isExplicit()) {
                return true;
            }
        }
        return false;
    }
1079229
public boolean contains(Container subset) {
    if(subset instanceof RunContainer) {
      return contains((RunContainer)subset);
    } else if(subset instanceof ArrayContainer) {
      return contains((ArrayContainer) subset);
    } else if(subset instanceof BitmapContainer){
      return contains((BitmapContainer)subset);
    }
    return false;
  }
801795
public boolean contains(Object o) {
		for (int i = 0; i < events.size(); i++) {
			try {
				if (events.get(i).equals(o)) {
					return true;
				}
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
		return false;
	}
303122
public static <T> Iterator<T> singleElementIterator(final T element) {
    return new Iterator<T>() {
      private boolean mHasNext = true;

      @Override
      public boolean hasNext() {
        return mHasNext;
      }

      @Override
      public T next() {
        if (!hasNext()) {
          throw new NoSuchElementException();
        }
        mHasNext = false;
        return element;
      }

      @Override
      public void remove() {
        throw new UnsupportedOperationException("remove is not supported.");
      }
    };
  }
874273
public <E extends T> Iterator<E> filter (final Iterator<E> input)
    {
        return new Iterator<E>() {
            // from Iterator
            public boolean hasNext ()
            {
                return _found || findNext();
            }

            // from Iterator
            public E next ()
            {
                if (_found || findNext()) {
                    _found = false;
                    return _last;

                } else {
                    throw new NoSuchElementException();
                }
            }

            // from Iterator
            public void remove ()
            {
                if (_removeable) {
                    _removeable = false;
                    input.remove();

                } else {
                    throw new IllegalStateException();
                }
            }

            private boolean findNext ()
            {
                boolean result = false;
                while (input.hasNext()) {
                    E candidate = input.next();
                    if (isMatch(candidate)) {
                        _last = candidate;
                        result = true;
                        break;
                    }
                }

                _found = result;
                _removeable = result;
                return result;
            }

            private E _last;
            private boolean _found; // because _last == null is a valid element
            private boolean _removeable;
        };
    }
1216077
public boolean containsIteratorForTable(String aTable)
    {
        boolean result = false;

        if (m_rsIterators != null)
        {
            for (int i = 0; i < m_rsIterators.size(); i++)
            {
                OJBIterator it = (OJBIterator) m_rsIterators.get(i);
                if (it instanceof RsIterator)
                {
                    if (((RsIterator) it).getClassDescriptor().getFullTableName().equals(aTable))
                    {
                        result = true;
                        break;
                    }
                }
                else if (it instanceof ChainingIterator)
                {
                    result = ((ChainingIterator) it).containsIteratorForTable(aTable);
                }
            }
        }

        return result;
    }
1319634
public static <E> boolean include(final Iterable<E> iterable, final E elem) {
        return contains(iterable, elem);
    }