Checks if the supplied {@link Item} or any of its {@link Item#getParent()} are being deleted.

@param item the item.
@return {@code true} if the {@link Item} or any of its {@link Item#getParent()} are being deleted.
480886
public static boolean contains(@Nonnull Item item) {
        ItemDeletion instance = instance();
        if (instance == null) {
            return false;
        }
        instance.lock.readLock().lock();
        try {
            return instance._contains(item);
        } finally {
            instance.lock.readLock().unlock();
        }
    }
74593
public synchronized void remove(ModuleItem item) {
        if (item == null || children == null)
            return;

        // remove from all the parents which have links to it due to aggregate data
        PmiModule removeInstance = item.getInstance();
        if (!(removeInstance instanceof PmiModuleAggregate)) {
            // recursively remove aggregate data for parents
            ModuleItem myParent = this;
            PmiModule parModule = null;
            while (myParent != null) {
                parModule = myParent.getInstance();
                // if parent is aggregate
                if (parModule != null && parModule instanceof PmiModuleAggregate)
                    ((PmiModuleAggregate) parModule).remove(removeInstance);

                myParent = myParent.getParent();
            }
        }

        // remove any children
        item._cleanChildren();

        // remove ModuleItem
        children.remove(item.getInstance().getName());

        if (myStatsWithChildren != null) {
            updateStatsTree();
        }

        //bStatsTreeNeedsUpdate = true;

        // remove mbean mapping and deactivate any CustomStats mbean
        //_cleanMBean(item);
        item.getInstance().cleanup();
        item = null;
    }
220276
public void onDeleted(TopLevelItem item) throws IOException {
        ItemListener.fireOnDeleted(item);

        items.remove(item.getName());
        // For compatibility with old views:
        for (View v : views)
            v.onJobRenamed(item, item.getName(), null);
    }
508084
public final void add(@NonNull final AbstractItem item) {
        Condition.INSTANCE.ensureNotNull(item, "The item may not be null");
        items.add(item);

        if (item instanceof Item && ((Item) item).getIcon() != null) {
            iconCount++;
        } else if (item instanceof Divider) {
            dividerCount++;
        }

        rawItems = null;
        notifyOnDataSetChanged();
    }
687159
public function delete($item){
		self::log('delete:'.$item);
		if ( $this->checkFilePath($item) &&
            ftp_delete($this->cn,$item) ){
      return true;
		}
		return false;
	}
459379
public static boolean isRegistered(@Nonnull Item item) {
        ItemDeletion instance = instance();
        if (instance == null) {
            return false;
        }
        instance.lock.readLock().lock();
        try {
            return instance.registrations.contains(item);
        } finally {
            instance.lock.readLock().unlock();
        }
    }
1062214
public boolean remove(ESigItem item) {
        boolean result = items.remove(item);
        
        if (result) {
            removed(item);
        }
        
        return result;
    }
503664
private boolean hasSelectedChildren(CmsTreeItem item) {

        for (String childId : m_childrens.get(item.getId())) {
            CmsTreeItem child = m_categories.get(childId);
            if (child.getCheckBox().isChecked() || hasSelectedChildren(child)) {
                return true;
            }
        }
        return false;
    }
135606
public final Boolean isDeleted() {
        Boolean deleted = getObject(DELETED_CONST, Boolean.class);
        return deleted != null ? deleted : false;
    }
165048
public function contains( $item ) {
			
			for ( $i=0; $i < $this->len; $i++ ) {
			
				if ( $this->compare( $item, $this->items[$i] ) === 0 ) {
			
					return true;
			
				}
			
			}

			return false;
		}
1264096
public static boolean hasDefaultConstructor(TypeDef item) {
        if (item == null) {
            return false;
        } else if (item.getConstructors().isEmpty()) {
            return true;
        } else {
            for (Method constructor : item.getConstructors()) {
                if (constructor.getArguments().size() == 0) {
                    return true;
                }
            }
        }
        return false;
    }
745671
public synchronized boolean add(ModuleItem item) {
        if (item == null)
            return false;

        if (children == null)
            //children = new ArrayList();
            children = new TreeMap();

        String itemName = item.getInstance().getName();
        if (find(itemName) == null) {
            item.setParent(this);
            children.put(itemName, item);

            /*
             * // add it to parent in a sorted way
             * int ind = 0;
             * boolean added = false;
             * while(ind < children.size())
             * {
             * ModuleItem child = (ModuleItem)children.get(ind);
             * String childName = child.getInstance().getName();
             * 
             * int cmp = childName.compareTo(itemName);
             * if(cmp == 0)
             * {
             * // duplicate module name (display name)
             * return false;
             * }
             * else if(cmp > 0)
             * {
             * children.add(ind, item);
             * added = true;
             * break;
             * }
             * else
             * {
             * ind++;
             * }
             * }
             * 
             * if(!added)
             * children.add(item);
             */

            if (myStatsWithChildren != null)
                addToStatsTree(item);

            //bStatsTreeNeedsUpdate = true;

            return true;
        } else {
            // a module with the same name already exists
            return false;
        }
    }
88938
public static void deregister(@Nonnull Item item) {
        ItemDeletion instance = instance();
        if (instance != null) {
            instance.lock.writeLock().lock();
            try {
                instance.registrations.remove(item);
            } finally {
                instance.lock.writeLock().unlock();
            }
        }
    }
1061096
@SuppressWarnings({"unchecked"})
    public final boolean matches(Object item) {
        return item != null
                && expectedType.isInstance(item)
                && matchesSafely((T) item);
    }
159131
public function matchItem(ItemInterface $item)
    {
        $request = $this->requestStack->getCurrentRequest();

        $parent = $item->getParent();

        while (null !== $parent->getParent()) {
            $parent = $parent->getParent();
        }

        if ($item->getUri() === $request->getRequestUri() or
            $item->getUri() === $request->attributes->get('__current_folder_path', false)
        ) {
            // URL's completely match
            return true;
        } elseif (
            $item->getUri() !== $request->getBaseUrl().'/' and
            $item->getUri() !== $request->getBaseUrl().'/admin/' and
            $item->getUri() === substr($request->getRequestUri(), 0, strlen($item->getUri())) and
            $request->attributes->get('__selected_inheritance', true) and
            $parent->getExtra('select_intehitance', true)
        ) {
            // URL isn't just "/" and the first part of the URL match
            return true;
        }

        return false;
    }
1283833
@Override
    public void removeItem(int itemID) {
        super.removeItem(itemID);
        ratingsItem.remove(itemID);
        itemsStats.remove(itemID);
    }
753580
public boolean removeItem (T item)
    {
        int index = _items.indexOf(item);
        if (index == -1) {
            return false;
        }
        _items.remove(index);
        removeItem(index);
        return true;
    }