<p>
Checks whether the specified element occurs within this range.
</p>

@param element
the element to check for, null returns false
@return true if the specified element occurs within this range
181365
public boolean contains(final T element) {
        if (element == null) {
            return false;
        }

        return lowerEndpoint.includes(element) && upperEndpoint.includes(element);
    }
542336
public boolean isEndedBy(final T element) {
        if (element == null) {
            return false;
        }

        return upperEndpoint.isClosed && upperEndpoint.compareTo(element) == 0;
    }
1034529
public boolean hasDependent(T element) {
      lock.readLock().lock();
      try {
         Set<T> ts = this.incomingEdges.get(element);
         return ts != null && ts.size() > 0;
      } finally {
         lock.readLock().unlock();
      }

   }
943605
@FFDCIgnore(IndexOutOfBoundsException.class)
    private boolean ensureElement(int index) {
        try {
            get(index);
            return true;
        } catch (IndexOutOfBoundsException e) {
            return false;
        }
    }
1342598
public boolean offer(T element) {
		if (size < capacity) {
			put(element);
			return true;
		} else if (size > 0 && !lessThan(element, peek())) {
			heap[1] = element;
			adjustTop();
			return true;
		} else {
			return false;
		}
	}
267459
public synchronized void removeElement(T element) {
		List<T> origList = ref.get().list;
		boolean isPresent = origList.contains(element);
		if (!isPresent) {
			return;
		}
		
		List<T> newList = new ArrayList<T>(origList);
		newList.remove(element);
		
		swapWithList(newList);
	}
140303
public boolean containsElement(Element element) {
        String deepName = getDeepName(element);
        return elementNameSortOrderMap.containsKey(deepName);
    }
181035
public static boolean contains(Iterator<?> iterator, Object element) {
        if (iterator != null) {
            while (iterator.hasNext()) {
                Object candidate = iterator.next();
                if (ObjectUtils.nullSafeEquals(candidate, element)) {
                    return true;
                }
            }
        }
        return false;
    }
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;
    }
751566
public int find(int element) {
        if (trees[element] != element)
            trees[element] = find(trees[element]);
        return trees[element];
    }
79774
public boolean remove(final T element) {
    for (int i = 0; i < this.size; i++)
      if (this.elements[i].equals(element)) {
        System.arraycopy(this.elements, i + 1, this.elements, i, this.size - (i + 1));
        this.size--;
        return true;
      }
    return false;
  }
148246
public synchronized void removeElement(T element) {
    checkArgument(
        element.getNext() != null || element.getPrev() != null || element == head,
        "Element not in the list.");
    size--;
    T prev = element.getPrev();
    T next = element.getNext();
    if (prev == null) {
      // This is the first element
      head = next;
      if (head != null) {
        // If more than one element in the list.
        head.setPrev(null);
        element.setNext(null);
      }
    } else if (next == null) {
      // This is the last element, and there is at least another element because
      // element.getPrev() != null.
      prev.setNext(null);
      element.setPrev(null);
    } else {
      prev.setNext(element.getNext());
      next.setPrev(element.getPrev());
      element.setNext(null);
      element.setPrev(null);
    }
  }
500558
public static boolean contains(Iterator<?> iterator, @Nullable Object element) {
    return any(iterator, equalTo(element));
  }
29645
public static boolean hasBackground(Element element) {

        String backgroundColor = CmsDomUtil.getCurrentStyle(element, Style.backgroundColor);
        String backgroundImage = CmsDomUtil.getCurrentStyle(element, Style.backgroundImage);
        if ((isTransparent(backgroundColor))
            && ((backgroundImage == null)
                || (backgroundImage.trim().length() == 0)
                || backgroundImage.equals(StyleValue.none.toString()))) {
            return false;
        }
        return true;
    }
1372927
public static void removeChildrenFrom(final Element element) {
        if (element != null) {
            while (element.getFirstChild() != null) {
                element.removeChild(element.getFirstChild());
            }
        }
    }
1127825
public boolean hasNext() {
        if (currentIndex == endIndex) {
            return false;
        }
              
        // Otherwise, see if nextElement is null. If so, try to load the next
        // element to make sure it exists.
        if (nextElement == null) {
            nextElement = getNextElement();
            if (nextElement == null) {
                return false;
            }
        }
        return true;
    }
1075744
private void processElement(Element element) {
    context.setCurrentSegment(element);
    currentProp = null;
    currentAttribute = null;

    // Process attributes
    boolean shouldPopContext = processElementAttributes(element);

    // Process text segments
    StreamSupport
        .stream(((Iterable<Segment>) element::getNodeIterator).spliterator(), false)
        .filter(segment -> !(segment instanceof Tag)
            && !(segment instanceof CharacterReference))
        .filter(segment -> {
          for (Element child : element.getChildElements()) {
            if (child.encloses(segment)) {
              return false;
            }
          }
          return true;
        })
        .forEach(this::processTextNode);

    // Recurse downwards
    element.getChildElements().
        forEach(this::processElement);

    // After downward recursion, pop the context layer if necessary
    if (shouldPopContext) {
      context.popContextLayer();
    }
  }