Performs the unary negation {@code -} operator on the value.
175850
public static NumberData negative(SoyValue node) {
    if (node instanceof IntegerData) {
      return IntegerData.forValue(-node.longValue());
    } else {
      return FloatData.forValue(-node.floatValue());
    }
  }
33731
public static IntegerBinding negateExact(final ObservableIntegerValue a) {
        return createIntegerBinding(() -> Math.negateExact(a.get()), a);
    }
494323
protected static function parseOperatorAndValue($value, $is_negation)
    {
        if ($result = static::parseComparisonOperator($value, $is_negation)) {
            return $result;
        }

        if ($result = static::parseLikeOperator($value, $is_negation)) {
            return $result;
        }

        if ($result = static::parseNullOperator($value, $is_negation)) {
            return $result;
        }

        if ($result = static::parseEqualsInOperator($value, $is_negation)) {
            return $result;
        }

        throw new InvalidArgumentException(sprintf('Unable to parse operator or value from "%s"', $value));
    }
376976
public static FormValidation validateNonNegativeInteger(String value) {
        try {
            if(Integer.parseInt(value)<0)
                return error(hudson.model.Messages.Hudson_NotANonNegativeNumber());
            return ok();
        } catch (NumberFormatException e) {
            return error(hudson.model.Messages.Hudson_NotANumber());
        }
    }
435451
public static Value<Boolean> not (Value<Boolean> value)
    {
        return value.map(Functions.NOT);
    }
205277
def negated(self):
        
        query = self.copy()
        op = self.op()
        query.setOp(self.NegatedOp.get(op, op))
        query.setValue(self.value())
        return query
95316
def _prohibited(from_op, to_op):
    ""
    # 'not' can only be removed but not replaced with
    # '+', '-' or '~' b/c that may lead to strange results
    if from_op is UnaryOperators.Not:
        if to_op is not UnaryOperators.Nothing:
            return True

    # '+1' => '1' yields equivalent mutations
    if from_op is UnaryOperators.UAdd:
        if to_op is UnaryOperators.Nothing:
            return True

    return False
115176
public static <T> Predicate<T> negate(
        Predicate<? super T> p)
    {
        Objects.requireNonNull(p, "The predicate is null");
        return new Predicate<T>()
        {
            @Override
            public boolean test(T t)
            {
                return !p.test(t);
            }
            
            @Override
            public String toString()
            {
                return "!(" + p + ")";
            }
        };
    }
1239980
@Override
    public <N extends Number> Expression<N> neg(Expression<N> arg0)
    {
        // TODO Auto-generated method stub
        return null;
    }
791041
@Override
    public Object visitNegation(ExcellentParser.NegationContext ctx) {
        return Conversions.toDecimal(visit(ctx.expression()), m_evalContext).negate();
    }
240251
public static void notNegative(Long value) {
		if(!validation) return;
		notNull(value);
		if(value < 0)
			throw new ParameterException(ErrorCode.NEGATIVE);
	}
585773
public static function doUnaryOperation($operator, &$value)
    {
        if (self::$unaryOperations === null) {
            self::$unaryOperations = [
                    self::BITWISE_NOT   => function (&$i) { return ~$i; },
                    self::NOT           => function (&$i) { return !$i; },
                    self::INCREMENT     => function (&$i) { return $i++; },
                    self::DECREMENT     => function (&$i) { return $i--; },
                    self::PRE_INCREMENT => function (&$i) { return ++$i; },
                    self::PRE_DECREMENT => function (&$i) { return --$i; },
                    self::NEGATION      => function (&$i) { return -$i; },
                    self::PLUS          => function (&$i) { return +$i; },
            ];
        }

        if (!isset(self::$unaryOperations[$operator])) {
            throw new PinqException('Unary operator \'%s\' is not supported', $operator);
        }

        $operation = self::$unaryOperations[$operator];

        return $operation($value);
    }
1061722
public static Float checkNull(Float value, Float elseValue) {
        return isNull(value) ? elseValue : value;
    }
1347239
public static Boolean not(Boolean bVal) 
  {
//    return notTable[lookupValue];
    if(bVal == null)
      return null;
    else if (bVal.equals(Boolean.TRUE))
      return Boolean.FALSE;
    else if (bVal.equals(Boolean.FALSE))
      return Boolean.TRUE;
    else return null;  
    
  }
1294061
public static double nonNegative(final double value, final String message) {
		if (value < 0) {
			throw new IllegalArgumentException(format(
				"%s must not be negative: %f.", message, value
			));
		}
		return value;
	}
1247109
function isNaN(value, message, id) {
    if (message === void 0) { message = ''; }
    if (id === void 0) { id = ''; }
    if (this.enabled && !Number.isNaN(value)) {
        throw TypeException.unexpectedType(assertionTypes.IS_NAN, value, '<NaN>', message, id);
    }
}
447566
function processUnary(tokenizer, scope) {
  const unaryAddSubtract = {
    '-': value => -value,
    '+': value => value
  };

  if (tokenizer.token.match(types.ADD_SUBTRACT)) {
    return createOperatorNode(unaryAddSubtract[tokenizer.token.lexeme], [processUnary(tokenizer.skipToken(), scope)]);
  }

  if (tokenizer.token.match(types.INCREASE_DECREASE) || tokenizer.token.match(types.LOGICAL_NEGATION)) {
    return createOperatorNode(tokenizer.token.value, [processUnary(tokenizer.skipToken(), scope)]);
  }

  return processIdentifiers(tokenizer, scope);
}