Check that the current object has not been deleted.

@param r   The object.
@param <R> A deletable object.

@return The object.

@throws JCGLExceptionDeleted If the object has been deleted.
@see JCGLResourceUsableType#isDeleted()
762142
public static <R extends JCGLResourceUsableType> R checkNotDeleted(
    final R r)
    throws JCGLExceptionDeleted
  {
    NullCheck.notNull(r, "Resource");

    if (r.isDeleted()) {
      throw new JCGLExceptionDeleted(
        String.format(
          "Cannot perform operation: OpenGL object %s has been deleted.", r));
    }

    return r;
  }
823855
@Override
  public void delete(Object obj) {
    String id = this.keyOf(obj);
    lock.writeLock().lock();
    try {
      this.populated = true;
      if (this.knownObjects == null) {
        if (!this.items.containsKey(id)) {
          // Presumably, this was deleted when a relist happened.
          // Don't provide a second report of the same deletion.
          return;
        }
      } else {
        // We only want to skip the "deletion" action if the object doesn't
        // exist in knownObjects and it doesn't have corresponding item in items.
        if (this.knownObjects.getByKey(id) == null && !this.items.containsKey(id)) {
          return;
        }
      }
      this.queueActionLocked(DeltaType.Deleted, obj);
    } finally {
      lock.writeLock().unlock();
    }
  }
242896
public synchronized void gc() {
        if (!configuration.isUseGc()) {
            LOG.trace("GC deactivated, no beans will be removed!");
            return;
        }

        LOG.trace("Garbage collection started! GC will remove {} beans!", removeOnGC.size());

        onRemoveCallback.onReject(removeOnGC.keySet());

        for (Map.Entry<Instance, Object> entry : removeOnGC.entrySet()) {
            Instance removedInstance = entry.getKey();
            for (Property property : removedInstance.getProperties()) {
                propertyToParent.remove(property);
            }
            for (ObservableList list : removedInstance.getLists()) {
                listToParent.remove(list);
            }
            allInstances.remove(entry.getValue());
        }

        removedBeansCount = removedBeansCount + removeOnGC.size();
        removeOnGC.clear();
        gcCalls = gcCalls + 1;

        LOG.trace("Garbage collection done! GC currently manages {} referenced beans!", allInstances.size());
    }
378107
private MutablePair<DeltaType, Object> isDeletionDup(
      MutablePair<DeltaType, Object> d1, MutablePair<DeltaType, Object> d2) {
    if (!d1.getLeft().equals(DeltaType.Deleted) || !d2.getLeft().equals(DeltaType.Deleted)) {
      return null;
    }
    Object obj = d2.getRight();
    if (obj instanceof DeletedFinalStateUnknown) {
      return d1;
    }
    return d2;
  }
160358
public static boolean isNull( Object obj ) {
      if( obj instanceof JSONObject ){
         return ((JSONObject) obj).isNullObject();
      }
      return JSONNull.getInstance()
            .equals( obj );
   }
26028
public static boolean isNull(Object object) {
    // don't call nullOf because will throw IllegalArgumentException if cannot create instance
    return object != null && object == NULL_CACHE.get(object.getClass());
  }
1276814
public boolean isCancelled() {
    Object r;
    return ((r = result) instanceof AltResult)
        && (((AltResult) r).ex instanceof CancellationException);
  }
1083212
private static <T> T reportGet(Object r)
        throws InterruptedException, ExecutionException {
        if (r == null) // by convention below, null means interrupted
            throw new InterruptedException();
        if (r instanceof AltResult) {
            Throwable x, cause;
            if ((x = ((AltResult)r).ex) == null)
                return null;
            if (x instanceof CancellationException)
                throw (CancellationException)x;
            if ((x instanceof CompletionException) &&
                (cause = x.getCause()) != null)
                x = cause;
            throw new ExecutionException(x);
        }
        @SuppressWarnings("unchecked") T t = (T) r;
        return t;
    }
1290717
public static void checkDepthOnlyRenderableTexture2D(
    final JCGLTextureFormat t)
    throws JCGLExceptionFormatError
  {
    if (!isDepthRenderable(t)) {
      final String m =
        String.format("Format %s is not depth-renderable", t);
      assert m != null;
      throw new JCGLExceptionFormatError(m);
    }

    if (isStencilRenderable(t)) {
      final String m = String.format(
        "Format %s is stencil-renderable: Must be used as a depth+stencil "
          + "attachment",
        t);
      assert m != null;
      throw new JCGLExceptionFormatError(m);
    }
  }
922
@Override
  public boolean delete(Object bean) throws OptimisticLockException {
    methodCalls.add(MethodCall.of("bean").with("bean", bean));
    capturedBeans.addDeleted(bean);
    if (persistDeletes) {
      return delete.delete(bean, null);
    }
    return true;
  }
1311172
public boolean isDeleted()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
    {
      SibTr.entry(tc, "isDeleted");
      SibTr.exit(tc, "isDeleted", new Boolean(isDeleted));
    }
    return isDeleted;
  }
719963
@Deprecated
    protected boolean isRetriableException(Throwable e) {
        if (getRetryHandler() != null) {
            return getRetryHandler().isRetriableException(e, true);
        } 
        return false;
    }
825031
@Override
  public boolean deleteDataNode(String nodeId) {
    try {
      rwLock.writeLock().lock();
      return this.dataNodeMap.containsKey(nodeId) && deleteDataNode(this.dataNodeMap.get(nodeId));
    } finally {
      rwLock.writeLock().unlock();
    }
  }
232048
@SuppressWarnings("unchecked")
	@Override
	public <E> SqlEntityDelete<E> delete(final Class<? extends E> entityType) {
		@SuppressWarnings("rawtypes")
		EntityHandler handler = this.getEntityHandler();
		if (!handler.getEntityType().isAssignableFrom(entityType)) {
			throw new IllegalArgumentException("Entity type not supported");
		}

		try {
			TableMetadata metadata = handler.getMetadata(this.transactionManager, entityType);

			SqlContext context = handler.createDeleteContext(this, metadata, entityType, false);
			context.setSqlKind(SqlKind.DELETE);

			return new SqlEntityDeleteImpl<>(this, handler, metadata, context);
		} catch (SQLException e) {
			throw new EntitySqlRuntimeException(SqlKind.DELETE, e);
		}
	}
301680
public boolean isDeleted(Cell cell)
    {
        int idx = searchInternal(cell.name(), 0);
        // No matter what the counter cell's timestamp is, a tombstone always takes precedence. See CASSANDRA-7346.
        return idx >= 0 && (cell instanceof CounterCell || markedAts[idx] >= cell.timestamp());
    }
741362
public int filterObject(CaptureSearchResult r) {
		if(!notifiedSeen) { 
			if(filterGroup != null) {
				filterGroup.setSawAdministrative();
			}
			notifiedSeen = true;
		}
		String url = r.getUrlKey();
		if(lastChecked != null) {
			if(lastChecked.equals(url)) {
				if(lastCheckedExcluded) { 
					return ObjectFilter.FILTER_EXCLUDE;
				} else {
					// don't need to: already did last time...
					//filterGroup.setPassedAdministrative();
					return ObjectFilter.FILTER_INCLUDE;
				}
			}
		}
		lastChecked = url;
		lastCheckedExcluded = isExcluded(url);
		if(lastCheckedExcluded) {
			return ObjectFilter.FILTER_EXCLUDE;
		} else {
			if(!notifiedPassed) {
				if(filterGroup != null) {
					filterGroup.setPassedAdministrative();
				}
				notifiedPassed = true;
			}
			return ObjectFilter.FILTER_INCLUDE;
		}
			
	}
420829
@Override
    public boolean delete(K key) throws Exception {
        if(key == null) {
            throw new NullPointerException("key");
        }
        
        return _store.delete(_keySerializer.serialize(key));
    }