Returns whether an element is package private.

@param element The element
@return True if it is package provide
348791
boolean isPackagePrivate(Element element) {
        Set<Modifier> modifiers = element.getModifiers();
        return !(modifiers.contains(PUBLIC)
            || modifiers.contains(PROTECTED)
            || modifiers.contains(PRIVATE));
    }
1205306
public boolean isExternal(ProgramElementDoc doc) {
        if (packageToItemMap == null) {
            return false;
        }
        return packageToItemMap.get(doc.containingPackage().name()) != null;
    }
98535
static boolean isElementParentName(Element element, String name) {
        Element parent = element.getParentElement();
        if (parent == null) {
            return false;
        }
        return isElementName(parent, name);
    }
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;
		}
	}
1133382
public boolean isAfter(final T element) {
        if (element == null) {
            return false;
        }
        return comparator.compare(element, minimum) < 0;
    }
657693
private boolean isValidElement(String element) {

        boolean validateNewElement = Boolean.valueOf(getParamValidateNewElement()).booleanValue();
        if (ALL.equals(getParamTemplate()) || !validateNewElement) {
            return true;
        }

        return isValidTemplateElement(getParamTemplate(), element);
    }
399086
protected boolean checkPackageLocators(String classPackageName) {
		if (packageLocators != null && !disablePackageLocatorsScanning && classPackageName.length() > 0
				&& (packageLocatorsBasePackage == null || classPackageName.startsWith(packageLocatorsBasePackage))) {
			for (String packageLocator : packageLocators) {
				String[] splitted = classPackageName.split("\\.");

				if (es.cenobit.struts2.json.util.StringUtils.contains(splitted, packageLocator, false))
					return true;
			}
		}
		return false;
	}
1066408
@Override
  public boolean isPrivate(String name) {
    return name.endsWith("_") && !name.endsWith("__") && !isExported(name);
  }
128082
private static String getTextContent(final Element element) {
		if (element != null) {
			String content = element.getTextContent();
			if (content != null) {
				content = content.trim();
			}
			return content;
		}
		return null;
	}
459062
protected boolean addElem(final T element) {
    // validate element
    if (element == null) {
      throw new IllegalArgumentException("Null element is not supported.");
    }
    // find hashCode & index
    final int hashCode = element.hashCode();
    final int index = getIndex(hashCode);
    // return false if already present
    if (containsElem(index, element, hashCode)) {
      return false;
    }

    modification++;
    size++;

    // update bucket linked list
    DoubleLinkedElement<T> le = new DoubleLinkedElement<T>(element, hashCode);
    le.next = entries[index];
    entries[index] = le;

    // insert to the end of the all-element linked list
    le.after = null;
    le.before = tail;
    if (tail != null) {
      tail.after = le;
    }
    tail = le;
    if (head == null) {
      head = le;
    }
    return true;
  }
50098
public boolean isStartedBy(final T element) {
        if (element == null) {
            return false;
        }

        return lowerEndpoint.isClosed && lowerEndpoint.compareTo(element) == 0;
    }
739608
private List<Element> getInheritedPackagePrivateMethods() {
        List<Element> results = new ArrayList<>();
        for (TypeElement currentClass : visibleClasses) {
            if (currentClass != typeElement &&
                utils.isPackagePrivate(currentClass) &&
                !utils.isLinkable(currentClass)) {
                // Document these members in the child class because
                // the parent is inaccessible.
                results.addAll(classMap.get(currentClass).members);
            }
        }
        return results;
    }
1084655
public boolean isEndedBy(final T element) {
        if (element == null) {
            return false;
        }
        return comparator.compare(element, maximum) == 0;
    }
21117
public boolean isIBMPackage(String packageName) {
        if (packageName != null) {
            BundlePackages p = populatePackageLists();
            // If we still can't get our list of packages (for example, in unit tests), let everything pass
            if (p != null) {
                if (p.containsPrivatePackage(packageName)) {
                    return true;
                } else if (p.containsExportedPackage(packageName)) {
                    // Add an extra check - if this is an exported package, it could be spec or third-party, not IBM
                    SharedPackageInspector inspector = st.getService();
                    if (inspector != null) {
                        PackageType exported = inspector.getExportedPackageType(packageName);
                        // If it's spec, third party, or stable it's not internal - otherwise, it is
                        if ( exported == null )
                            return true;
                        if ( exported.isSpecApi() || exported.isThirdPartyApi() || exported.isStableApi() ) 
                            return false;
                        
                        return true;
                    }

                    // If we couldn't get hold of the service, assume it was internal if our bundles export it
                    return true;
                }

            }
        }
        return false;
    }
232307
public static Set<PackageElement>
            packagesIn(Set<? extends Element> elements) {
        return setFilter(elements, PACKAGE_KIND, PackageElement.class);
    }
230240
public static String getPackage(String element) {
        Preconditions.checkNotNull(element,"argument 'element' can not be null");
        return element.substring(0, element.lastIndexOf('.'));
    }
803032
private List<ProgramElementDoc> getInheritedPackagePrivateMethods(Configuration configuration) {
        List<ProgramElementDoc> results = new ArrayList<ProgramElementDoc>();
        for (Iterator<ClassDoc> iter = visibleClasses.iterator(); iter.hasNext(); ) {
            ClassDoc currentClass = iter.next();
            if (currentClass != classdoc &&
                currentClass.isPackagePrivate() &&
                !Util.isLinkable(currentClass, configuration)) {
                // Document these members in the child class because
                // the parent is inaccessible.
                results.addAll(getMembersFor(currentClass));
            }
        }
        return results;
    }