本文整理了Java中com.fasterxml.jackson.databind.node.ObjectNode._put()
方法的一些代码示例,展示了ObjectNode._put()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ObjectNode._put()
方法的具体详情如下:
包路径:com.fasterxml.jackson.databind.node.ObjectNode
类名称:ObjectNode
方法名:_put
暂无
代码示例来源:origin: redisson/redisson
/**
* Method for setting value of a field to specified numeric value.
*
* @return This node (to allow chaining)
*/
public ObjectNode put(String fieldName, short v) {
return _put(fieldName, numberNode(v));
}
代码示例来源:origin: redisson/redisson
/**
* @return This node (to allow chaining)
*/
public ObjectNode putPOJO(String fieldName, Object pojo) {
return _put(fieldName, pojoNode(pojo));
}
代码示例来源:origin: redisson/redisson
/**
* @since 2.6
*/
public ObjectNode putRawValue(String fieldName, RawValue raw) {
return _put(fieldName, rawValueNode(raw));
}
代码示例来源:origin: redisson/redisson
/**
* Method for setting value of a field to specified numeric value.
*
* @return This node (to allow chaining)
*/
public ObjectNode put(String fieldName, float v) {
return _put(fieldName, numberNode(v));
}
代码示例来源:origin: redisson/redisson
/**
* Method for setting value of a field to specified numeric value.
*
* @return This node (to allow chaining)
*/
public ObjectNode put(String fieldName, double v) {
return _put(fieldName, numberNode(v));
}
代码示例来源:origin: redisson/redisson
/**
* Method for setting value of a field to specified numeric value.
* The underlying {@link JsonNode} that will be added is constructed
* using {@link JsonNodeFactory#numberNode(int)}, and may be
* "smaller" (like {@link ShortNode}) in cases where value fits within
* range of a smaller integral numeric value.
*
* @return This node (to allow chaining)
*/
public ObjectNode put(String fieldName, int v) {
return _put(fieldName, numberNode(v));
}
代码示例来源:origin: redisson/redisson
/**
* Method for setting value of a field to specified String value.
*
* @return This node (to allow chaining)
*/
public ObjectNode put(String fieldName, boolean v) {
return _put(fieldName, booleanNode(v));
}
代码示例来源:origin: redisson/redisson
/**
* Method for setting value of a field to specified numeric value.
* The underlying {@link JsonNode} that will be added is constructed
* using {@link JsonNodeFactory#numberNode(long)}, and may be
* "smaller" (like {@link IntNode}) in cases where value fits within
* range of a smaller integral numeric value.
*
* @return This node (to allow chaining)
*/
public ObjectNode put(String fieldName, long v) {
return _put(fieldName, numberNode(v));
}
代码示例来源:origin: redisson/redisson
/**
* Method that will construct an ArrayNode and add it as a
* field of this ObjectNode, replacing old value, if any.
*<p>
* <b>NOTE</b>: Unlike all <b>put(...)</b> methods, return value
* is <b>NOT</b> this <code>ObjectNode</code>, but the
* <b>newly created</b> <code>ArrayNode</code> instance.
*
* @return Newly constructed ArrayNode (NOT the old value,
* which could be of any type)
*/
public ArrayNode putArray(String fieldName)
{
ArrayNode n = arrayNode();
_put(fieldName, n);
return n;
}
代码示例来源:origin: redisson/redisson
/**
* Method that will construct an ObjectNode and add it as a
* field of this ObjectNode, replacing old value, if any.
*<p>
* <b>NOTE</b>: Unlike all <b>put(...)</b> methods, return value
* is <b>NOT</b> this <code>ObjectNode</code>, but the
* <b>newly created</b> <code>ObjectNode</code> instance.
*
* @return Newly constructed ObjectNode (NOT the old value,
* which could be of any type)
*/
public ObjectNode putObject(String fieldName)
{
ObjectNode n = objectNode();
_put(fieldName, n);
return n;
}
代码示例来源:origin: redisson/redisson
/**
* Alternative method that we need to avoid bumping into NPE issues
* with auto-unboxing.
*
* @return This node (to allow chaining)
*/
public ObjectNode put(String fieldName, Short v) {
return _put(fieldName, (v == null) ? nullNode()
: numberNode(v.shortValue()));
}
代码示例来源:origin: redisson/redisson
/**
* Alternative method that we need to avoid bumping into NPE issues
* with auto-unboxing.
*
* @return This node (to allow chaining)
*/
public ObjectNode put(String fieldName, Boolean v) {
return _put(fieldName, (v == null) ? nullNode()
: booleanNode(v.booleanValue()));
}
代码示例来源:origin: redisson/redisson
/**
* Alternative method that we need to avoid bumping into NPE issues
* with auto-unboxing.
*
* @return This node (to allow chaining)
*/
public ObjectNode put(String fieldName, Integer v) {
return _put(fieldName, (v == null) ? nullNode()
: numberNode(v.intValue()));
}
代码示例来源:origin: redisson/redisson
/**
* Alternative method that we need to avoid bumping into NPE issues
* with auto-unboxing.
*
* @return This node (to allow chaining)
*/
public ObjectNode put(String fieldName, Float v) {
return _put(fieldName, (v == null) ? nullNode()
: numberNode(v.floatValue()));
}
代码示例来源:origin: redisson/redisson
/**
* Alternative method that we need to avoid bumping into NPE issues
* with auto-unboxing.
*
* @return This node (to allow chaining)
*/
public ObjectNode put(String fieldName, Double v) {
return _put(fieldName, (v == null) ? nullNode()
: numberNode(v.doubleValue()));
}
代码示例来源:origin: redisson/redisson
/**
* Method for setting value of a field to specified numeric value.
*
* @return This node (to allow chaining)
*/
public ObjectNode put(String fieldName, BigDecimal v) {
return _put(fieldName, (v == null) ? nullNode()
: numberNode(v));
}
代码示例来源:origin: redisson/redisson
/**
* Method for setting value of a field to specified String value.
*
* @return This node (to allow chaining)
*/
public ObjectNode put(String fieldName, String v) {
return _put(fieldName, (v == null) ? nullNode()
: textNode(v));
}
代码示例来源:origin: redisson/redisson
/**
* Method for setting value of a field to specified binary value
*
* @return This node (to allow chaining)
*/
public ObjectNode put(String fieldName, byte[] v) {
return _put(fieldName, (v == null) ? nullNode()
: binaryNode(v));
}
代码示例来源:origin: redisson/redisson
/**
* Method for setting value of a field to specified numeric value.
*
* @return This node (to allow chaining)
*
* @since 2.9
*/
public ObjectNode put(String fieldName, BigInteger v) {
return _put(fieldName, (v == null) ? nullNode()
: numberNode(v));
}
代码示例来源:origin: redisson/redisson
/**
* Method for setting value of a field to specified numeric value.
* The underlying {@link JsonNode} that will be added is constructed
* using {@link JsonNodeFactory#numberNode(Long)}, and may be
* "smaller" (like {@link IntNode}) in cases where value fits within
* range of a smaller integral numeric value.
* <p>
* Note that this is alternative to {@link #put(String, long)} needed to avoid
* bumping into NPE issues with auto-unboxing.
*
* @return This node (to allow chaining)
*/
public ObjectNode put(String fieldName, Long v) {
return _put(fieldName, (v == null) ? nullNode()
: numberNode(v.longValue()));
}
内容来源于网络,如有侵权,请联系作者删除!