本文整理了Java中org.apache.sis.util.Numbers.valueOfNil()
方法的一些代码示例,展示了Numbers.valueOfNil()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Numbers.valueOfNil()
方法的具体详情如下:
包路径:org.apache.sis.util.Numbers
类名称:Numbers
方法名:valueOfNil
[英]Returns a NaN, zero, empty or null value of the given type. This method tries to return the closest value that can be interpreted as "none", which is usually not the same than "zero". More specifically:
代码示例来源:origin: apache/sis
/**
* Returns a "nil" value. This is used for creating empty ranges.
*/
private Object valueOfNil() {
Object value = Numbers.valueOfNil(elementType);
if (value == null) {
if (Date.class.isAssignableFrom(elementType)) {
value = new Date();
} else {
value = 0;
}
}
return convert(value);
}
代码示例来源:origin: org.apache.sis.core/sis-utility
/**
* Returns a "nil" value. This is used for creating empty ranges.
*/
private Object valueOfNil() {
Object value = Numbers.valueOfNil(elementType);
if (value == null) {
if (Date.class.isAssignableFrom(elementType)) {
value = new Date();
} else {
value = 0;
}
}
return convert(value);
}
代码示例来源:origin: org.apache.sis.core/sis-utility
return Numbers.valueOfNil(method.getReturnType());
代码示例来源:origin: apache/sis
return Numbers.valueOfNil(method.getReturnType());
代码示例来源:origin: apache/sis
newValues[0] = Numbers.valueOfNil(targetType);
代码示例来源:origin: org.apache.sis.core/sis-metadata
newValues[0] = Numbers.valueOfNil(targetType);
代码示例来源:origin: apache/sis
final Object[] values = new Object[parameters.length];
for (int i=0; i<values.length; i++) {
values[i] = Numbers.valueOfNil(parameters[i]);
内容来源于网络,如有侵权,请联系作者删除!