/** * Returns whether the provided value is compatible with this parameter * type. An object is compatible with a parameter type if the object is an * instance of the class defined as the parameter's type class. * * @param value * an object to check for compatibility with this parameter type; * may be <code>null</code>. * @return <code>true</code> if the value is compatible with this type, * <code>false</code> otherwise * @throws NotDefinedException * if the parameter type is not currently defined */ public boolean isCompatible(Object value) throws NotDefinedException { if (!isDefined()) { throw new NotDefinedException( "Cannot use isCompatible() with an undefined ParameterType"); //$NON-NLS-1$ } return isInstanceOf(value, type); }
/** * Returns whether the provided value is compatible with this parameter * type. An object is compatible with a parameter type if the object is an * instance of the class defined as the parameter's type class. * * @param value * an object to check for compatibility with this parameter type; * may be <code>null</code>. * @return <code>true</code> if the value is compatible with this type, * <code>false</code> otherwise * @throws NotDefinedException * if the parameter type is not currently defined */ public boolean isCompatible(Object value) throws NotDefinedException { if (!isDefined()) { throw new NotDefinedException( "Cannot use isCompatible() with an undefined ParameterType"); //$NON-NLS-1$ } return isInstanceOf(value, type); }
/** * Returns whether the provided value is compatible with this parameter * type. An object is compatible with a parameter type if the object is an * instance of the class defined as the parameter's type class. * * @param value * an object to check for compatibility with this parameter type; * may be <code>null</code>. * @return <code>true</code> if the value is compatible with this type, * <code>false</code> otherwise * @throws NotDefinedException * if the parameter type is not currently defined */ public boolean isCompatible(Object value) throws NotDefinedException { if (!isDefined()) { throw new NotDefinedException( "Cannot use isCompatible() with an undefined ParameterType"); //$NON-NLS-1$ } return isInstanceOf(value, type); }