public ArrayNode insertArray(int index) { ArrayNode n = arrayNode(); _insert(index, 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 insertObject(int index) { ObjectNode n = objectNode(); _insert(index, n); return n; }
public void insertNull(int index) { _insert(index, nullNode()); }
/** * Method for setting value of a field to specified numeric value. */ public void insert(int index, long v) { _insert(index, numberNode(v)); }
/** * Method for setting value of a field to specified numeric value. */ public void insert(int index, double v) { _insert(index, numberNode(v)); }
/** * Method for setting value of a field to specified String value. */ public void insert(int index, boolean v) { _insert(index, booleanNode(v)); }
/** * Method for setting value of a field to specified numeric value. */ public void insert(int index, int v) { _insert(index, numberNode(v)); }
/** * Method for setting value of a field to specified numeric value. */ public void insert(int index, float v) { _insert(index, numberNode(v)); }
/** * Method for inserting specified child node as an element * of this Array. If index is 0 or less, it will be inserted as * the first element; if >= size(), appended at the end, and otherwise * inserted before existing element in specified index. * No exceptions are thrown for any index. */ public void insert(int index, JsonNode value) { if (value == null) { value = nullNode(); } _insert(index, value); }
/** * Alternative method that we need to avoid bumping into NPE issues * with auto-unboxing. * * @since 1.9 */ public void insert(int index, Integer value) { if (value == null) { insertNull(index); } else { _insert(index, numberNode(value.intValue())); } }
/** * Alternative method that we need to avoid bumping into NPE issues * with auto-unboxing. * * @since 1.9 */ public void insert(int index, Float value) { if (value == null) { insertNull(index); } else { _insert(index, numberNode(value.floatValue())); } }
/** * Alternative method that we need to avoid bumping into NPE issues * with auto-unboxing. * * @since 1.9 */ public void insert(int index, Double value) { if (value == null) { insertNull(index); } else { _insert(index, numberNode(value.doubleValue())); } }
/** * Alternative method that we need to avoid bumping into NPE issues * with auto-unboxing. * * @since 1.9 */ public void insert(int index, Boolean value) { if (value == null) { insertNull(index); } else { _insert(index, booleanNode(value.booleanValue())); } }
/** * Alternative method that we need to avoid bumping into NPE issues * with auto-unboxing. * * @since 1.9 */ public void insert(int index, Long value) { if (value == null) { insertNull(index); } else { _insert(index, numberNode(value.longValue())); } }
/** * Method for setting value of a field to specified String value. */ public void insert(int index, String v) { if (v == null) { insertNull(index); } else { _insert(index, textNode(v)); } }
/** * Method for setting value of a field to specified binary value */ public void insert(int index, byte[] v) { if (v == null) { insertNull(index); } else { _insert(index, binaryNode(v)); } }
/** * Method that will construct a POJONode and add it at the end * of this array node. */ public void insertPOJO(int index, Object value) { if (value == null) { insertNull(index); } else { _insert(index, POJONode(value)); } }
/** * Method for setting value of a field to specified numeric value. */ public void insert(int index, BigDecimal v) { if (v == null) { insertNull(index); } else { _insert(index, numberNode(v)); } }
public ArrayNode insertArray(int index) { ArrayNode n = arrayNode(); _insert(index, n); return n; }
/** * Alternative method that we need to avoid bumping into NPE issues * with auto-unboxing. * * @since 1.9 */ public void insert(int index, Long value) { if (value == null) { insertNull(index); } else { _insert(index, numberNode(value.longValue())); } }