/** * Method for adding specified number at the end of this array. * * @return This array node, to allow chaining */ public ArrayNode add(float v) { return _add(numberNode(v)); }
/** * Method for adding specified boolean value at the end of this array. * * @return This array node, to allow chaining */ public ArrayNode add(boolean v) { return _add(booleanNode(v)); }
/** * Method that will construct an ArrayNode and add it at the end * of this array node. * * @return Newly constructed ArrayNode */ public ArrayNode addArray() { ArrayNode n = arrayNode(); _add(n); return n; }
/** * Method that will construct an ObjectNode and add it at the end * of this array node. * * @return Newly constructed ObjectNode */ public ObjectNode addObject() { ObjectNode n = objectNode(); _add(n); return n; }
/** * Method for adding specified number at the end of this array. * * @return This array node, to allow chaining */ public ArrayNode add(long v) { return _add(numberNode(v)); }
/** * Method for adding specified number at the end of this array. * * @return This array node, to allow chaining */ public ArrayNode add(int v) { _add(numberNode(v)); return this; }
/** * Method for adding specified number at the end of this array. * * @return This array node, to allow chaining */ public ArrayNode add(double v) { return _add(numberNode(v)); }
/** * Method for adding specified node at the end of this array. * * @return This node, to allow chaining */ public ArrayNode add(JsonNode value) { if (value == null) { // let's not store 'raw' nulls but nodes value = nullNode(); } _add(value); return this; }
/** * Method that will add a null value at the end of this array node. * * @return This array node, to allow chaining */ public ArrayNode addNull() { _add(nullNode()); return this; }
/** * 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())); }
/** * 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())); }
/** * 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())); }
/** * 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())); }
/** * 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())); }
/** * 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)); }
/** * 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)); }
/** * 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)); }
/** * @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; }
/** * 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)); }
/** * 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; }