Return true if the given Element should be included
in the serialized form.

@param element the Element to check for serializability.
321255
private static boolean serialDocInclude(Utils utils, Element element) {
        if (utils.isEnum(element)) {
            return false;
        }
        List<? extends DocTree> serial = utils.getSerialTrees(element);
        if (!serial.isEmpty()) {
            CommentHelper ch = utils.getCommentHelper(element);
            String serialtext = Utils.toLowerCase(ch.getText(serial.get(0)));
            if (serialtext.contains("exclude")) {
                return false;
            } else if (serialtext.contains("include")) {
                return true;
            }
        }
        return true;
    }
1285046
public void add(JsonElement element) {
    if (element == null) {
      element = JsonNull.INSTANCE;
    }
    elements.add(element);
  }
34532
public static String serialize(Element element) {
        Writer sw = new StringBuilderWriter();
        serialize(new DOMSource(element), sw);
        return sw.toString();
    }
542336
public boolean isEndedBy(final T element) {
        if (element == null) {
            return false;
        }

        return upperEndpoint.isClosed && upperEndpoint.compareTo(element) == 0;
    }
1311101
public static boolean isAnnotated(AnnotatedElement element, Class<? extends Annotation> annotationType) {
        return findAnnotation(element, annotationType) != null;
    }
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);
	}
1310739
public void addElement(ObjectProperty element) {
        assertNotNull(element);
        if (elements == null) {
            elements = new ArrayList<ObjectProperty>();
        }
        elements.add(element);
        element.setParent(this);
    }
1147146
public void hasFirstElement(@NullableDecl Object element) {
    if (actualAsNavigableSet().isEmpty()) {
      failWithActual("expected to have first element", element);
      return;
    }

    if (!Objects.equal(actualAsNavigableSet().first(), element)) {
      if (actualAsNavigableSet().contains(element)) {
        failWithoutActual(
            simpleFact(
                lenientFormat(
                    "Not true that %s has first element <%s>. "
                        + "It does contain this element, but the first element is <%s>",
                    actualAsString(), element, actualAsNavigableSet().first())));
        return;
      }
      failWithoutActual(
          simpleFact(
              lenientFormat(
                  "Not true that %s has first element <%s>. "
                      + "It does not contain this element, and the first element is <%s>",
                  actualAsString(), element, actualAsNavigableSet().first())));
    }
  }
450272
private void checkElement(Element elementToBeAdded) {
        if (!(elementToBeAdded instanceof Person) && !(elementToBeAdded instanceof SoftwareSystem) && !(elementToBeAdded instanceof Container) && !(elementToBeAdded instanceof Component)) {
            throw new IllegalArgumentException("Only people, software systems, containers and components can be added to dynamic views.");
        }

        // people can always be added
        if (elementToBeAdded instanceof Person) {
            return;
        }

        // if the scope of this dynamic view is a software system, we only want:
        //  - containers inside that software system
        //  - other software systems
        if (element instanceof SoftwareSystem) {
            if (elementToBeAdded.equals(element)) {
                throw new IllegalArgumentException(elementToBeAdded.getName() + " is already the scope of this view and cannot be added to it.");
            }
            if (elementToBeAdded instanceof Container && !elementToBeAdded.getParent().equals(element)) {
                throw new IllegalArgumentException("Only containers that reside inside " + element.getName() + " can be added to this view.");
            }
            if (elementToBeAdded instanceof Component) {
                throw new IllegalArgumentException("Components can't be added to a dynamic view when the scope is a software system.");
            }
        }

        // if the scope of this dynamic view is a container, we only want other containers inside the same software system
        // and other components inside the container
        if (element instanceof Container) {
            if (elementToBeAdded.equals(element) || elementToBeAdded.equals(element.getParent())) {
                throw new IllegalArgumentException(elementToBeAdded.getName() + " is already the scope of this view and cannot be added to it.");
            }
            if (elementToBeAdded instanceof Container && !elementToBeAdded.getParent().equals(element.getParent())) {
                throw new IllegalArgumentException("Only containers that reside inside " + element.getParent().getName() + " can be added to this view.");
            }

            if (elementToBeAdded instanceof Component && !elementToBeAdded.getParent().equals(element)) {
                throw new IllegalArgumentException("Only components that reside inside " + element.getName() + " can be added to this view.");
            }
        }

        if (element == null) {
            if (!(elementToBeAdded instanceof SoftwareSystem)) {
                throw new IllegalArgumentException("Only people and software systems can be added to this dynamic view.");
            }
        }
    }
395943
public boolean contains(final T element) {
        if (element == null) {
            return false;
        }
        return comparator.compare(element, minimum) > -1 && comparator.compare(element, maximum) < 1;
    }
1169074
function checkElement(node, attr, includeScope) {
  var elements = getElements(node, attr);

  if (includeScope && node.hasAttribute(attr)) {
    elements.push(node);
  }

  return elements;
}
648752
public static boolean isPrimitiveWrapper(Element element) {
		if (element == null) {
			return false;
		} else if (element.toString().equals(Boolean.class.getCanonicalName())) {
			return true;
		} else if (element.toString().equals(Integer.class.getCanonicalName())) {
			return true;
		} else if (element.toString().equals(Long.class.getCanonicalName())) {
			return true;
		} else if (element.toString().equals(Byte.class.getCanonicalName())) {
			return true;
		} else if (element.toString().equals(Short.class.getCanonicalName())) {
			return true;
		} else if (element.toString().equals(Character.class.getCanonicalName())) {
			return true;
		} else if (element.toString().equals(Double.class.getCanonicalName())) {
			return true;
		} else if (element.toString().equals(Float.class.getCanonicalName())) {
			return true;
		} else {
			return false;
		}
	}
170171
public boolean contains(Data element) {
        boolean contains = false;
        byte[] dst = new byte[gp.getElementSize()];
        for (int m = 0; m < memory.length; m++) {
            ByteBuffer bb = ByteBuffer.wrap(memory[m]);
            if (m == memory.length - 1) {
                bb.limit(position_in_chunk);
            }
            while (bb.remaining() > 0) {
                bb.get(dst);
                if (KeyUtils.compareKey(element.toByteBuffer().array(), dst) > 0) {
                    contains = true;
                    break;
                }
            }
            if (contains) {
                break;
            }
        }
        return contains;
    }
1062036
protected function serializeElement($element)
	{
		return (is_array($element)) ? $this->serializeStrings($element) : $this->serializeLiteral($element);
	}
121625
public function shouldParseElementOnMove(Element $element): bool
    {
        $fieldLayout = $element->getFieldLayout();

        if ($fieldLayout) {
            foreach ($fieldLayout->getFields() as $field) {
                if ($field && \get_class($field) === 'aelvan\preparsefield\fields\PreparseFieldType') {
                    /** @var PreparseFieldType $field */
                    $parseOnMove = $field->parseOnMove;

                    if ($parseOnMove) {
                        return true;
                    }
                }
            }
        }

        return false;
    }
377742
private boolean isIncluded(final HttpServletRequest request) {
		final String uri = (String) request.getAttribute("javax.servlet.include.request_uri");
		final boolean includeRequest = !(uri == null);

		if (includeRequest && log.isDebugEnabled()) {
			log.debug("{} resulted in an include request. This is unusable, because"
					+ "the response will be assembled into the overrall response. Not gzipping.",
					request.getRequestURL());
		}
		return includeRequest;
	}
1195474
public boolean isExternal(Element element) {
        if (packageToItemMap == null) {
            return false;
        }
        PackageElement pe = configuration.utils.containingPackage(element);
        if (pe.isUnnamed()) {
            return false;
        }
        return packageToItemMap.get(configuration.utils.getPackageName(pe)) != null;
    }