org.apache.wicket.util.lang.Objects.getNumericType()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(3.7k)|赞(0)|评价(0)|浏览(132)

本文整理了Java中org.apache.wicket.util.lang.Objects.getNumericType()方法的一些代码示例,展示了Objects.getNumericType()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Objects.getNumericType()方法的具体详情如下:
包路径:org.apache.wicket.util.lang.Objects
类名称:Objects
方法名:getNumericType

Objects.getNumericType介绍

[英]Returns the constant from the NumericTypes interface that best expresses the type of an operation, which can be either numeric or not, on the two given types.
[中]从NumericTypes接口返回常数,该常数最能表示两个给定类型上的操作类型,该类型可以是数值类型,也可以不是数值类型。

代码示例

代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service

  1. /**
  2. * Returns the constant from the NumericTypes interface that best expresses the type of a
  3. * numeric operation on the two given objects.
  4. *
  5. * @param v1
  6. * one argument to a numeric operator
  7. * @param v2
  8. * the other argument
  9. * @return the appropriate constant from the NumericTypes interface
  10. */
  11. public static int getNumericType(Object v1, Object v2)
  12. {
  13. return getNumericType(v1, v2, false);
  14. }

代码示例来源:origin: org.apache.wicket/wicket-util

  1. /**
  2. * Returns the constant from the NumericTypes interface that best expresses the type of a
  3. * numeric operation on the two given objects.
  4. *
  5. * @param v1
  6. * one argument to a numeric operator
  7. * @param v2
  8. * the other argument
  9. * @return the appropriate constant from the NumericTypes interface
  10. */
  11. public static int getNumericType(final Object v1, final Object v2)
  12. {
  13. return getNumericType(v1, v2, false);
  14. }

代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket

  1. /**
  2. * Returns the constant from the NumericTypes interface that best expresses the type of a
  3. * numeric operation on the two given objects.
  4. *
  5. * @param v1
  6. * one argument to a numeric operator
  7. * @param v2
  8. * the other argument
  9. * @return the appropriate constant from the NumericTypes interface
  10. */
  11. public static int getNumericType(Object v1, Object v2)
  12. {
  13. return getNumericType(v1, v2, false);
  14. }

代码示例来源:origin: org.apache.wicket/wicket-util

  1. /**
  2. * Returns the constant from the NumericTypes interface that best expresses the type of an
  3. * operation, which can be either numeric or not, on the two given objects.
  4. *
  5. * @param v1
  6. * one argument to an operator
  7. * @param v2
  8. * the other argument
  9. * @param canBeNonNumeric
  10. * whether the operator can be interpreted as non-numeric
  11. * @return the appropriate constant from the NumericTypes interface
  12. */
  13. public static int getNumericType(final Object v1, final Object v2, final boolean canBeNonNumeric)
  14. {
  15. return getNumericType(getNumericType(v1), getNumericType(v2), canBeNonNumeric);
  16. }

代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket

  1. /**
  2. * Returns the constant from the NumericTypes interface that best expresses the type of an
  3. * operation, which can be either numeric or not, on the two given objects.
  4. *
  5. * @param v1
  6. * one argument to an operator
  7. * @param v2
  8. * the other argument
  9. * @param canBeNonNumeric
  10. * whether the operator can be interpreted as non-numeric
  11. * @return the appropriate constant from the NumericTypes interface
  12. */
  13. public static int getNumericType(Object v1, Object v2, boolean canBeNonNumeric)
  14. {
  15. return getNumericType(getNumericType(v1), getNumericType(v2), canBeNonNumeric);
  16. }

代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service

  1. /**
  2. * Returns the constant from the NumericTypes interface that best expresses the type of an
  3. * operation, which can be either numeric or not, on the two given objects.
  4. *
  5. * @param v1
  6. * one argument to an operator
  7. * @param v2
  8. * the other argument
  9. * @param canBeNonNumeric
  10. * whether the operator can be interpreted as non-numeric
  11. * @return the appropriate constant from the NumericTypes interface
  12. */
  13. public static int getNumericType(Object v1, Object v2, boolean canBeNonNumeric)
  14. {
  15. return getNumericType(getNumericType(v1), getNumericType(v2), canBeNonNumeric);
  16. }

代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service

  1. int t1 = getNumericType(v1), t2 = getNumericType(v2), type = getNumericType(t1, t2,
  2. true);

代码示例来源:origin: org.apache.wicket/wicket-util

  1. int t1 = getNumericType(v1), t2 = getNumericType(v2), type = getNumericType(t1, t2,
  2. true);

代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket

  1. int t1 = getNumericType(v1), t2 = getNumericType(v2), type = getNumericType(t1, t2,
  2. true);

相关文章