本文整理了Java中com.fasterxml.jackson.databind.node.ArrayNode.addNull()
方法的一些代码示例,展示了ArrayNode.addNull()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ArrayNode.addNull()
方法的具体详情如下:
包路径:com.fasterxml.jackson.databind.node.ArrayNode
类名称:ArrayNode
方法名:addNull
[英]Method that will add a null value at the end of this array node.
[中]方法,该方法将在此数组节点的末尾添加空值。
代码示例来源:origin: redisson/redisson
/**
* Alternative method that we need to avoid bumping into NPE issues
* with auto-unboxing.
*
* @return This array node, to allow chaining
*/
public ArrayNode add(Float value) {
if (value == null) {
return addNull();
}
return _add(numberNode(value.floatValue()));
}
代码示例来源:origin: redisson/redisson
/**
* Alternative method that we need to avoid bumping into NPE issues
* with auto-unboxing.
*
* @return This array node, to allow chaining
*/
public ArrayNode add(Double value) {
if (value == null) {
return addNull();
}
return _add(numberNode(value.doubleValue()));
}
代码示例来源:origin: redisson/redisson
/**
* Alternative method that we need to avoid bumping into NPE issues
* with auto-unboxing.
*
* @return This array node, to allow chaining
*/
public ArrayNode add(Integer value) {
if (value == null) {
return addNull();
}
return _add(numberNode(value.intValue()));
}
代码示例来源:origin: redisson/redisson
/**
* Alternative method that we need to avoid bumping into NPE issues
* with auto-unboxing.
*
* @return This array node, to allow chaining
*/
public ArrayNode add(Long value) {
if (value == null) {
return addNull();
}
return _add(numberNode(value.longValue()));
}
代码示例来源:origin: redisson/redisson
/**
* Alternative method that we need to avoid bumping into NPE issues
* with auto-unboxing.
*
* @return This array node, to allow chaining
*/
public ArrayNode add(Boolean value) {
if (value == null) {
return addNull();
}
return _add(booleanNode(value.booleanValue()));
}
代码示例来源:origin: redisson/redisson
/**
* Method for adding specified binary value at the end of this array
* (note: when serializing as JSON, will be output Base64 encoded)
*
* @return This array node, to allow chaining
*/
public ArrayNode add(byte[] v) {
if (v == null) {
return addNull();
}
return _add(binaryNode(v));
}
代码示例来源:origin: redisson/redisson
/**
* Method for adding specified String value at the end of this array.
*
* @return This array node, to allow chaining
*/
public ArrayNode add(String v) {
if (v == null) {
return addNull();
}
return _add(textNode(v));
}
代码示例来源:origin: redisson/redisson
/**
* Method for adding specified number at the end of this array.
*
* @return This array node, to allow chaining
*/
public ArrayNode add(BigDecimal v) {
if (v == null) {
return addNull();
}
return _add(numberNode(v));
}
代码示例来源:origin: redisson/redisson
/**
* Method for adding specified number at the end of this array.
*
* @return This array node, to allow chaining
*
* @since 2.9
*/
public ArrayNode add(BigInteger v) {
if (v == null) {
return addNull();
}
return _add(numberNode(v));
}
代码示例来源:origin: redisson/redisson
/**
* @return This array node, to allow chaining
*
* @since 2.6
*/
public ArrayNode addRawValue(RawValue raw) {
if (raw == null) {
addNull();
} else {
_add(rawValueNode(raw));
}
return this;
}
代码示例来源:origin: redisson/redisson
/**
* Method that will construct a POJONode and add it at the end
* of this array node.
*
* @return This array node, to allow chaining
*/
public ArrayNode addPOJO(Object value)
{
if (value == null) {
addNull();
} else {
_add(pojoNode(value));
}
return this;
}
代码示例来源:origin: com.eclipsesource.jaxrs/jersey-all
/**
* Alternative method that we need to avoid bumping into NPE issues
* with auto-unboxing.
*
* @return This array node, to allow chaining
*/
public ArrayNode add(Integer value) {
if (value == null) {
return addNull();
}
return _add(numberNode(value.intValue()));
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics
/**
* Alternative method that we need to avoid bumping into NPE issues
* with auto-unboxing.
*
* @return This array node, to allow chaining
*/
public ArrayNode add(Long value) {
if (value == null) {
return addNull();
}
return _add(numberNode(value.longValue()));
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics
/**
* Alternative method that we need to avoid bumping into NPE issues
* with auto-unboxing.
*
* @return This array node, to allow chaining
*/
public ArrayNode add(Double value) {
if (value == null) {
return addNull();
}
return _add(numberNode(value.doubleValue()));
}
代码示例来源:origin: hstaudacher/osgi-jax-rs-connector
/**
* Alternative method that we need to avoid bumping into NPE issues
* with auto-unboxing.
*
* @return This array node, to allow chaining
*/
public ArrayNode add(Integer value) {
if (value == null) {
return addNull();
}
return _add(numberNode(value.intValue()));
}
代码示例来源:origin: hstaudacher/osgi-jax-rs-connector
/**
* Alternative method that we need to avoid bumping into NPE issues
* with auto-unboxing.
*
* @return This array node, to allow chaining
*/
public ArrayNode add(Float value) {
if (value == null) {
return addNull();
}
return _add(numberNode(value.floatValue()));
}
代码示例来源:origin: Nextdoor/bender
/**
* Alternative method that we need to avoid bumping into NPE issues
* with auto-unboxing.
*
* @return This array node, to allow chaining
*/
public ArrayNode add(Integer value) {
if (value == null) {
return addNull();
}
return _add(numberNode(value.intValue()));
}
代码示例来源:origin: Nextdoor/bender
/**
* Alternative method that we need to avoid bumping into NPE issues
* with auto-unboxing.
*
* @return This array node, to allow chaining
*/
public ArrayNode add(Long value) {
if (value == null) {
return addNull();
}
return _add(numberNode(value.longValue()));
}
代码示例来源:origin: com.jwebmp.jackson.core/jackson-databind
/**
* Method for adding specified number at the end of this array.
*
* @return This array node, to allow chaining
*/
public ArrayNode add(BigDecimal v) {
if (v == null) {
return addNull();
}
return _add(numberNode(v));
}
代码示例来源:origin: Nextdoor/bender
/**
* Method for adding specified binary value at the end of this array
* (note: when serializing as JSON, will be output Base64 encoded)
*
* @return This array node, to allow chaining
*/
public ArrayNode add(byte[] v) {
if (v == null) {
return addNull();
}
return _add(binaryNode(v));
}
内容来源于网络,如有侵权,请联系作者删除!