本文整理了Java中org.codehaus.jackson.JsonNode.getDoubleValue()
方法的一些代码示例,展示了JsonNode.getDoubleValue()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JsonNode.getDoubleValue()
方法的具体详情如下:
包路径:org.codehaus.jackson.JsonNode
类名称:JsonNode
方法名:getDoubleValue
暂无
代码示例来源:origin: org.apache.avro/avro
private boolean defaultValueEquals(JsonNode thatDefaultValue) {
if (defaultValue == null)
return thatDefaultValue == null;
if (Double.isNaN(defaultValue.getDoubleValue()))
return Double.isNaN(thatDefaultValue.getDoubleValue());
return defaultValue.equals(thatDefaultValue);
}
代码示例来源:origin: org.codehaus.jackson/jackson-mapper-asl
@Override
public float getFloatValue() throws IOException, JsonParseException {
return (float) currentNumericNode().getDoubleValue();
}
代码示例来源:origin: org.codehaus.jackson/jackson-mapper-asl
@Override
public double getDoubleValue() throws IOException, JsonParseException {
return currentNumericNode().getDoubleValue();
}
代码示例来源:origin: org.apache.avro/avro
if (!n.isNumber())
throw new AvroTypeException("Non-numeric default value for float: "+n);
e.writeFloat((float) n.getDoubleValue());
break;
case DOUBLE:
if (!n.isNumber())
throw new AvroTypeException("Non-numeric default value for double: "+n);
e.writeDouble(n.getDoubleValue());
break;
case BOOLEAN:
代码示例来源:origin: camunda/camunda-bpm-platform
@Override
public float getFloatValue() throws IOException, JsonParseException {
return (float) currentNumericNode().getDoubleValue();
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Override
public double getDoubleValue() throws IOException, JsonParseException {
return currentNumericNode().getDoubleValue();
}
代码示例来源:origin: org.apache.avro/avro
case VALUE_NUMBER_FLOAT:
out.writeIndex(JsonType.DOUBLE.ordinal());
out.writeDouble(node.getDoubleValue());
break;
case VALUE_STRING:
代码示例来源:origin: klout/brickhouse
return jsonNode.getIntValue();
case FLOAT:
return new Float(jsonNode.getDoubleValue());
case DOUBLE:
return jsonNode.getDoubleValue();
case BOOLEAN:
return jsonNode.getBooleanValue();
代码示例来源:origin: com.atlassian.jira/jira-core
public double getDoubleValue()
{
return delegate.getDoubleValue();
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.avro
private boolean defaultValueEquals(JsonNode thatDefaultValue) {
if (defaultValue == null)
return thatDefaultValue == null;
if (Double.isNaN(defaultValue.getDoubleValue()))
return Double.isNaN(thatDefaultValue.getDoubleValue());
return defaultValue.equals(thatDefaultValue);
}
代码示例来源:origin: org.codehaus.jackson/jackson-mapper-lgpl
@Override
public double getDoubleValue() throws IOException, JsonParseException {
return currentNumericNode().getDoubleValue();
}
代码示例来源:origin: com.barchart.wrap/barchart-wrap-jackson
@Override
public float getFloatValue() throws IOException, JsonParseException {
return (float) currentNumericNode().getDoubleValue();
}
代码示例来源:origin: org.codehaus.jackson/jackson-mapper-lgpl
@Override
public float getFloatValue() throws IOException, JsonParseException {
return (float) currentNumericNode().getDoubleValue();
}
代码示例来源:origin: zauberlabs/gnip4j
/** @return a point */
private Point createPoint(final JsonNode coordinates) throws IOException {
final Point ret;
if(coordinates.isArray()) {
ret = new Point(coordinates.get(0).getDoubleValue(), coordinates.get(1).getDoubleValue());
} else {
ret = null;
}
return ret;
}
代码示例来源:origin: jhpoelen/eol-globi-data
private boolean hasReasonableMatchScore(JsonNode result) {
double score = 0.0;
if (result.has("score")) {
if (result.get("score").isDouble()) {
score = result.get("score").getDoubleValue();
}
}
return score > minMatchScore;
}
代码示例来源:origin: NGDATA/hbase-indexer
public static Double getDouble(JsonNode node, String prop, Double defaultValue) throws JsonFormatException {
if (node.get(prop) == null) {
return defaultValue;
}
if (!node.get(prop).isLong() && !node.get(prop).isDouble()) {
throw new JsonFormatException("Not a double property: " + prop);
}
return node.get(prop).getDoubleValue();
}
代码示例来源:origin: NGDATA/lilyproject
public static Double getDouble(JsonNode node, String prop, Double defaultValue) throws JsonFormatException {
if (node.get(prop) == null) {
return defaultValue;
}
if (!node.get(prop).isLong() && !node.get(prop).isDouble()) {
throw new JsonFormatException("Not a double property: " + prop);
}
return node.get(prop).getDoubleValue();
}
代码示例来源:origin: com.ngdata/hbase-indexer-common
public static Double getDouble(JsonNode node, String prop, Double defaultValue) throws JsonFormatException {
if (node.get(prop) == null || node.get(prop).isNull()) {
return defaultValue;
}
if (!node.get(prop).isLong() && !node.get(prop).isDouble()) {
throw new JsonFormatException("Not a double property: " + prop);
}
return node.get(prop).getDoubleValue();
}
代码示例来源:origin: org.apache.isis.viewer/json-applib
private Double getDouble(final String path, final JsonNode node) {
if (representsNull(node)) {
return null;
}
checkValue(path, node, "a double");
if (!node.isDouble()) {
throw new IllegalArgumentException(formatExMsg(path, "is not a double"));
}
return node.getDoubleValue();
}
代码示例来源:origin: org.apache.isis.viewer/isis-viewer-restfulobjects-applib
private Double getDouble(final String path, final JsonNode node) {
if (representsNull(node)) {
return null;
}
checkValue(path, node, "a double");
if (!node.isDouble()) {
throw new IllegalArgumentException(formatExMsg(path, "is not a double"));
}
return node.getDoubleValue();
}
内容来源于网络,如有侵权,请联系作者删除!