MCPcopy Create free account
hub / github.com/amazon-ion/ion-java / put

Method put

src/main/java/com/amazon/ion/IonStruct.java:123–123  ·  view source on GitHub ↗

Puts a new field in this struct, replacing all existing fields with the same name. If child == null then all existing fields with the given name will be removed. If this is null.struct and child != null then this becomes a single-field struct. The effect of this

(String fieldName, IonValue child)

Source from the content-addressed store, hash-verified

121 * if {@code element} is an {@link IonDatagram}.
122 */
123 public void put(String fieldName, IonValue child)
124 throws ContainedValueException;
125
126

Implementers 1

IonStructLitesrc/main/java/com/amazon/ion/impl/lite

Calls

no outgoing calls

Tested by 15

testDeepPutMethod · 0.76
testGetFromNullMethod · 0.76
testPutNullMethod · 0.76
testBadPutsMethod · 0.76
testPutEmptyFieldMethod · 0.76