code: 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;
    }
docs: 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()