public static <T> T notNullNotEquals (final T aValue,
                                        @Nonnull final Supplier <? extends String> aName,
                                        @Nonnull final T aUnexpectedValue)
  {
    notNull (aValue, aName);
    notNull (aUnexpectedValue, "UnexpectedValue");
    if (isEnabled ())
      if (aValue.equals (aUnexpectedValue))
        throw new IllegalArgumentException ("The value of '" +
                                            aName.get () +
                                            "' may not be equal to " +
                                            aUnexpectedValue +
                                            "!");
    return aValue;
  }
public static < T > T notNullNotEquals ( final T aValue , @ Nonnull final Supplier < ? extends String > aName , @ Nonnull final T aUnexpectedValue ) { notNull ( aValue , aName ) ; notNull ( aUnexpectedValue , "UnexpectedValue" ) ; if ( isEnabled ( ) ) if ( aValue . equals ( aUnexpectedValue ) ) throw new IllegalArgumentException ( "The value of '" + aName . get ( ) + "' may not be equal to " + aUnexpectedValue + "!" ) ; return aValue ; }
Check that the passed value is not <code>null</code> and not equal to the
provided value.

@param <T>
Type to be checked and returned
@param aValue
The value to check. May not be <code>null</code>.
@param aName
The name of the value (e.g. the parameter name)
@param aUnexpectedValue
The value that may not be equal to aValue. May not be
<code>null</code>.
@return The passed value.