private static boolean isNumericalComparison(Type leftOperandType, Type rightOperandType) { return leftOperandType.isNumerical() || rightOperandType.isNumerical(); }
private static boolean isNumericalComparison(Type leftOperandType, Type rightOperandType) { return leftOperandType.isNumerical() || rightOperandType.isNumerical(); }
private boolean isNumericalComparison(Type leftOperandType, Type rightOperandType) { return leftOperandType.isNumerical() || rightOperandType.isNumerical(); }
private static boolean isRedundantNumericalCast(Type cast, Type expressionType) { return cast.isNumerical() && cast.equals(expressionType); }
private static boolean isRedundantNumericalCast(Type cast, Type expressionType) { return cast.isNumerical() && cast.equals(expressionType); }
private static boolean isNumerical(Type argType) { return argType.isNumerical() || isTypeOfAny(argType, "java.math.BigInteger", "java.math.BigDecimal", "java.lang.Byte", "java.lang.Short", "java.lang.Integer", "java.lang.Long", "java.lang.Float", "java.lang.Double"); }
private static boolean isNumerical(Type argType) { return argType.isNumerical() || isTypeOfAny(argType, "java.math.BigInteger", "java.math.BigDecimal", "java.lang.Byte", "java.lang.Short", "java.lang.Integer", "java.lang.Long", "java.lang.Float", "java.lang.Double"); }
private static boolean isNumericalPrimitive(Symbol symbol) { Type type = symbol.type(); return type.isPrimitive() && type.isNumerical(); }
private static boolean isNumericalPrimitive(Symbol symbol) { Type type = symbol.type(); return type.isPrimitive() && type.isNumerical(); }
private void checkTimeTypeArgument(MethodInvocationTree mit, Type argType) { if (!(argType.isNumerical() || argType.is("java.lang.Long") || isSubtypeOfAny(argType, "java.util.Date", "java.util.Calendar", "java.time.temporal.TemporalAccessor"))) { reportIssue(mit, "Time argument is expected (long, Long, Calendar, Date and TemporalAccessor)."); } }
private void checkTimeTypeArgument(MethodInvocationTree mit, Type argType) { if (!(argType.isNumerical() || argType.is("java.lang.Long") || isSubtypeOfAny(argType, "java.util.Date", "java.util.Calendar", "java.time.temporal.TemporalAccessor"))) { reportIssue(mit, "Time argument is expected (long, Long, Calendar, Date and TemporalAccessor)."); } }
private void checkTimeTypeArgument(MethodInvocationTree mit, Type argType) { if (!(argType.isNumerical() || argType.is("java.lang.Long") || argType.isSubtypeOf("java.util.Date") || argType.isSubtypeOf("java.util.Calendar"))) { addIssue(mit, "Time argument is expected (long, Long, Date or Calendar)."); } }
private boolean isNumerical(Type argType) { return argType.isNumerical() || argType.is("java.math.BigInteger") || argType.is("java.math.BigDecimal") || argType.is("java.lang.Byte") || argType.is("java.lang.Short") || argType.is("java.lang.Integer") || argType.is("java.lang.Long") || argType.is("java.lang.Float") || argType.is("java.lang.Double") ; }