Package com.github.wnameless.json.base
Interface JsonArrayCore<JVC extends JsonValueCore<JVC>>
- Type Parameters:
JVC- the type of a JSON implementation wrapper
- All Superinterfaces:
Iterable<JVC>,Jsonable,JsonArrayBase<JVC>,JsonSource,JsonValueBase<JVC>,JsonValueCore<JVC>
- All Known Implementing Classes:
GsonJsonArray,JacksonJsonArray,JakartaJsonArray,OrgJsonArray
public interface JsonArrayCore<JVC extends JsonValueCore<JVC>>
extends JsonArrayBase<JVC>, JsonValueCore<JVC>
- Author:
- Wei-Ming Wu
-
Method Summary
Modifier and TypeMethodDescriptionvoidadd(JsonSource jsonSource) Sets an element by givenJsonSource.remove(int index) Removes an element by given index.voidset(int index, JsonSource jsonSource) Sets an element by given index andJsonSource.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliteratorMethods inherited from interface com.github.wnameless.json.base.JsonArrayBase
get, isEmpty, size, stream, toListMethods inherited from interface com.github.wnameless.json.base.JsonSource
getSourceMethods inherited from interface com.github.wnameless.json.base.JsonValueBase
asBigDecimal, asBigInteger, asBoolean, asDouble, asInt, asLong, asNull, asNumber, asString, isArray, isBoolean, isNull, isNumber, isObject, isStringMethods inherited from interface com.github.wnameless.json.base.JsonValueCore
asArray, asObject, asValue
-
Method Details
-
add
Sets an element by givenJsonSource.- Parameters:
jsonSource- aJsonSource
-
set
Sets an element by given index andJsonSource.- Parameters:
index- a position in this JSON arrayjsonSource- aJsonSource
-
remove
Removes an element by given index.- Parameters:
index- a position in this JSON array- Returns:
- the removed element
-