Return true iff the given EJBObject reference is identical
to this wrapper. <p>

This method is part of the EJBObject interface. <p>
188054
@Override
    public boolean isIdentical(EJBObject obj) throws RemoteException
    {
        // ACK! The following implementation only works for the simplest
        // case. We're just going to rely on the ORB's implementation
        // of object equality.

        // This really needs a under-the-covers Remote interface to
        // allow us to obtain the BeanId of the other EJBObject to do
        // the comparison correctly.

        try {
            Object thisRef = container.getEJBRuntime().getRemoteReference(this);
            return thisRef.equals(obj); // d176674
        } catch (NoSuchObjectException ex) {
            FFDCFilter.processException(ex, CLASS_NAME + ".isIdentical", "151", this);
            return false;
        } catch (ClassCastException ex) {
            FFDCFilter.processException(ex, CLASS_NAME + ".isIdentical", "154", this);
            return false;
        }
    }
87123
public static boolean hasMethod(Object obj, String name) {
		if (obj == null)
			throw new NullPointerException("Object cannot be null");
		if (name == null)
			throw new NullPointerException("Method name cannot be null");

		Class<?> objClass = obj.getClass();

		for (Method method : objClass.getMethods()) {
			if (matchMethod(method, name))
				return true;
		}

		return false;
	}
824863
public boolean isEqualMappedBy(Function<? super E, ?> expectedMapper, Function<? super A, ?> actualMapper) {
		return isEqualBasedOn((expected, actual) -> {
			return Objects.equals(expectedMapper.apply(expected), actualMapper.apply(actual));
		});
	}
975092
public boolean isRedundant() {
    if (isListChange()) {
      return Objects.equals(oldList.get(),newList.get());
    }
    return oldValue.get().equals(newValue.get());
  }
664463
private boolean compareTypesOld(Type parmType, Type argType) {
        // XXX equality not implemented for GenericObjectType
        // if (parmType.equals(argType)) return true;
        // Compare type signatures instead
        if (GenericUtilities.getString(parmType).equals(GenericUtilities.getString(argType))) {
            return true;
        }

        if (parmType instanceof GenericObjectType) {
            GenericObjectType o = (GenericObjectType) parmType;
            if (o.getTypeCategory() == GenericUtilities.TypeCategory.WILDCARD_EXTENDS) {
                return compareTypesOld(o.getExtension(), argType);
            }
        }
        // ignore type variables for now
        if (parmType instanceof GenericObjectType && !((GenericObjectType) parmType).hasParameters()) {
            return true;
        }
        if (argType instanceof GenericObjectType && !((GenericObjectType) argType).hasParameters()) {
            return true;
        }

        // Case: Both are generic containers
        if (parmType instanceof GenericObjectType && argType instanceof GenericObjectType) {
            return true;
        } else {
            // Don't consider non reference types (should not be possible)
            if (!(parmType instanceof ReferenceType && argType instanceof ReferenceType)) {
                return true;
            }

            // Don't consider non object types (for now)
            if (!(parmType instanceof ObjectType && argType instanceof ObjectType)) {
                return true;
            }

            // Otherwise, compare base types ignoring generic information
            try {
                return Repository.instanceOf(((ObjectType) argType).getClassName(), ((ObjectType) parmType).getClassName());
            } catch (ClassNotFoundException e) {
            }
        }

        return true;
    }
441119
public static <T extends MethodDescription> ElementMatcher.Junction<T> isEquals() {
        return named("equals").and(takesArguments(TypeDescription.OBJECT)).and(returns(boolean.class));
    }
230400
@Pure
	protected boolean isSubTypeOf(EObject context, JvmTypeReference subType, JvmTypeReference superType) {
		if (isTypeReference(superType) && isTypeReference(subType)) {
			StandardTypeReferenceOwner owner = new StandardTypeReferenceOwner(services, context);
			LightweightTypeReferenceFactory factory = new LightweightTypeReferenceFactory(owner, false);
			LightweightTypeReference reference = factory.toLightweightReference(subType);
			return reference.isSubtypeOf(superType.getType());
		}
		return false;
	}
1141038
static boolean equalsImpl(List<?> list, @Nullable Object object) {
    if (object == checkNotNull(list)) {
      return true;
    }
    if (!(object instanceof List)) {
      return false;
    }

    List<?> o = (List<?>) object;

    return list.size() == o.size()
        && Iterators.elementsEqual(list.iterator(), o.iterator());
  }
640766
public static boolean isObjectMethod(Method method) {
		if (method == null) {
			return false;
		}
		try {
			Object.class.getDeclaredMethod(method.getName(), method.getParameterTypes());
			return true;
		}
		catch (Exception ex) {
			return false;
		}
	}
85863
protected static final boolean classEquals(Class clz1, Class clz2)
	{
		if (clz1 == null || clz2 == null)
		{
			throw new NullPointerException();
		}
		return clz1 == clz2 || clz1.getName().equals(clz2.getName());
	}
843846
private static boolean hasReferences(Bean target, BeanId reference) {
        for (String name : target.getReferenceNames()) {
            for (BeanId ref : target.getReference(name)) {
                if (ref.equals(reference)) {
                    return true;
                }
            }
        }
        return false;
    }
950952
private boolean isEqual(Object a, Object b) {

        if (a == null) {
            return (b == null);
        }
        if (b == null) {
            return false;
        }
        return a.equals(b);
    }
649655
public static boolean isClassesCompatible(Class<?> memberClass,
                                              Class<?> injectClass)
    {
        // If the class of the field or method is the injection
        // type or a parent of it, then the injection may occur.           d433391
        if (memberClass.isAssignableFrom(injectClass))
            return true;

        // TODO : Remove this hack when EJB injection is working properly
        // Currently for EJB injection from XML, the 'member' class is
        // is always set to 'Object'.                                      d433391
        if (injectClass.isAssignableFrom(memberClass))
            return true;

        // Otherwise, check to see if either is a primitive, and if so,
        // verify that the types are compatible.
        // TODO : this needs to handle where the primitive types are different
        //        but may still be compatible... or one is an Object that
        //        may be autoboxed to a primitive ..like Integer -> short
        return getPrimitiveClass(memberClass) == getPrimitiveClass(injectClass);
    }
1242530
boolean sameAs(final Model model) {
        if (model == null || model.queueSize != this.queueSize) {
            return false;
        }
        for (int i = 0; i < this.queueSize; i++) {
            if (this.queue[i] != model.queue[i]) {
                return false;
            }
        }
        return true;
    }
583758
public static boolean same(Localizable a, Localizable b)
    {
        return Double.compare(a.getX(), b.getX()) == 0 && Double.compare(a.getY(), b.getY()) == 0;
    }
757750
public boolean equivalent(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        RepositoryResourceImpl other = (RepositoryResourceImpl) obj;
        if (_asset == null) {
            if (other._asset != null)
                return false;
        } else if (!_asset.equivalent(other._asset))
            return false;
        return true;
    }
16122
final boolean checkFunctionEquivalenceHelper(
      FunctionType that, EquivalenceMethod eqMethod, EqCache eqCache) {
    if (this == that) {
      return true;
    }
    if (kind != that.kind) {
      return false;
    }
    switch (kind) {
      case CONSTRUCTOR:
        return false; // constructors use identity semantics, which we already checked for above.
      case INTERFACE:
        return getReferenceName().equals(that.getReferenceName());
      case ORDINARY:
        return typeOfThis.checkEquivalenceHelper(that.typeOfThis, eqMethod, eqCache)
            && call.checkArrowEquivalenceHelper(that.call, eqMethod, eqCache);
      default:
        throw new AssertionError();
    }
  }