Package org.apache.johnzon.core
Class JsonArrayBuilderImpl
- java.lang.Object
-
- org.apache.johnzon.core.JsonArrayBuilderImpl
-
- All Implemented Interfaces:
jakarta.json.JsonArrayBuilder
,Serializable
class JsonArrayBuilderImpl extends Object implements jakarta.json.JsonArrayBuilder, Serializable
-
-
Field Summary
Fields Modifier and Type Field Description private BufferStrategy.BufferProvider<char[]>
bufferProvider
private JsonProviderImpl
jsonProvider
private RejectDuplicateKeysMode
rejectDuplicateKeysMode
private List<jakarta.json.JsonValue>
tmpList
-
Constructor Summary
Constructors Modifier Constructor Description protected
JsonArrayBuilderImpl()
JsonArrayBuilderImpl(jakarta.json.JsonArray initialData, BufferStrategy.BufferProvider<char[]> provider, RejectDuplicateKeysMode rejectDuplicateKeysMode, JsonProviderImpl jsonProvider)
JsonArrayBuilderImpl(Collection<?> initialData, BufferStrategy.BufferProvider<char[]> provider, RejectDuplicateKeysMode rejectDuplicateKeysMode, JsonProviderImpl jsonProvider)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description jakarta.json.JsonArrayBuilder
add(boolean value)
jakarta.json.JsonArrayBuilder
add(double value)
jakarta.json.JsonArrayBuilder
add(int value)
jakarta.json.JsonArrayBuilder
add(int index, boolean value)
jakarta.json.JsonArrayBuilder
add(int index, double value)
jakarta.json.JsonArrayBuilder
add(int index, int value)
jakarta.json.JsonArrayBuilder
add(int index, long value)
jakarta.json.JsonArrayBuilder
add(int index, jakarta.json.JsonArrayBuilder builder)
jakarta.json.JsonArrayBuilder
add(int index, jakarta.json.JsonObjectBuilder builder)
jakarta.json.JsonArrayBuilder
add(int index, jakarta.json.JsonValue value)
jakarta.json.JsonArrayBuilder
add(int index, String value)
jakarta.json.JsonArrayBuilder
add(int index, BigDecimal value)
jakarta.json.JsonArrayBuilder
add(int index, BigInteger value)
jakarta.json.JsonArrayBuilder
add(long value)
jakarta.json.JsonArrayBuilder
add(jakarta.json.JsonArrayBuilder builder)
jakarta.json.JsonArrayBuilder
add(jakarta.json.JsonObjectBuilder builder)
jakarta.json.JsonArrayBuilder
add(jakarta.json.JsonValue value)
jakarta.json.JsonArrayBuilder
add(Object value)
jakarta.json.JsonArrayBuilder
add(String value)
jakarta.json.JsonArrayBuilder
add(BigDecimal value)
jakarta.json.JsonArrayBuilder
add(BigInteger value)
jakarta.json.JsonArrayBuilder
addAll(jakarta.json.JsonArrayBuilder builder)
jakarta.json.JsonArrayBuilder
addNull()
jakarta.json.JsonArrayBuilder
addNull(int index)
private void
addValue(int idx, jakarta.json.JsonValue value)
private void
addValue(jakarta.json.JsonValue value)
jakarta.json.JsonArray
build()
private static NullPointerException
npe()
jakarta.json.JsonArrayBuilder
remove(int index)
jakarta.json.JsonArrayBuilder
set(int index, boolean value)
jakarta.json.JsonArrayBuilder
set(int index, double value)
jakarta.json.JsonArrayBuilder
set(int index, int value)
jakarta.json.JsonArrayBuilder
set(int index, long value)
jakarta.json.JsonArrayBuilder
set(int index, jakarta.json.JsonArrayBuilder builder)
jakarta.json.JsonArrayBuilder
set(int index, jakarta.json.JsonObjectBuilder builder)
jakarta.json.JsonArrayBuilder
set(int index, jakarta.json.JsonValue value)
jakarta.json.JsonArrayBuilder
set(int index, String value)
jakarta.json.JsonArrayBuilder
set(int index, BigDecimal value)
jakarta.json.JsonArrayBuilder
set(int index, BigInteger value)
jakarta.json.JsonArrayBuilder
setNull(int index)
private void
setValue(int idx, jakarta.json.JsonValue value)
-
-
-
Field Detail
-
rejectDuplicateKeysMode
private RejectDuplicateKeysMode rejectDuplicateKeysMode
-
jsonProvider
private JsonProviderImpl jsonProvider
-
tmpList
private List<jakarta.json.JsonValue> tmpList
-
bufferProvider
private BufferStrategy.BufferProvider<char[]> bufferProvider
-
-
Constructor Detail
-
JsonArrayBuilderImpl
protected JsonArrayBuilderImpl()
-
JsonArrayBuilderImpl
public JsonArrayBuilderImpl(jakarta.json.JsonArray initialData, BufferStrategy.BufferProvider<char[]> provider, RejectDuplicateKeysMode rejectDuplicateKeysMode, JsonProviderImpl jsonProvider)
-
JsonArrayBuilderImpl
public JsonArrayBuilderImpl(Collection<?> initialData, BufferStrategy.BufferProvider<char[]> provider, RejectDuplicateKeysMode rejectDuplicateKeysMode, JsonProviderImpl jsonProvider)
-
-
Method Detail
-
addAll
public jakarta.json.JsonArrayBuilder addAll(jakarta.json.JsonArrayBuilder builder)
- Specified by:
addAll
in interfacejakarta.json.JsonArrayBuilder
-
add
public jakarta.json.JsonArrayBuilder add(int index, jakarta.json.JsonValue value)
- Specified by:
add
in interfacejakarta.json.JsonArrayBuilder
-
add
public jakarta.json.JsonArrayBuilder add(int index, String value)
- Specified by:
add
in interfacejakarta.json.JsonArrayBuilder
-
add
public jakarta.json.JsonArrayBuilder add(int index, BigDecimal value)
- Specified by:
add
in interfacejakarta.json.JsonArrayBuilder
-
add
public jakarta.json.JsonArrayBuilder add(int index, BigInteger value)
- Specified by:
add
in interfacejakarta.json.JsonArrayBuilder
-
add
public jakarta.json.JsonArrayBuilder add(int index, int value)
- Specified by:
add
in interfacejakarta.json.JsonArrayBuilder
-
add
public jakarta.json.JsonArrayBuilder add(int index, long value)
- Specified by:
add
in interfacejakarta.json.JsonArrayBuilder
-
add
public jakarta.json.JsonArrayBuilder add(int index, double value)
- Specified by:
add
in interfacejakarta.json.JsonArrayBuilder
-
add
public jakarta.json.JsonArrayBuilder add(int index, boolean value)
- Specified by:
add
in interfacejakarta.json.JsonArrayBuilder
-
addNull
public jakarta.json.JsonArrayBuilder addNull(int index)
- Specified by:
addNull
in interfacejakarta.json.JsonArrayBuilder
-
add
public jakarta.json.JsonArrayBuilder add(int index, jakarta.json.JsonObjectBuilder builder)
- Specified by:
add
in interfacejakarta.json.JsonArrayBuilder
-
add
public jakarta.json.JsonArrayBuilder add(int index, jakarta.json.JsonArrayBuilder builder)
- Specified by:
add
in interfacejakarta.json.JsonArrayBuilder
-
set
public jakarta.json.JsonArrayBuilder set(int index, jakarta.json.JsonValue value)
- Specified by:
set
in interfacejakarta.json.JsonArrayBuilder
-
set
public jakarta.json.JsonArrayBuilder set(int index, String value)
- Specified by:
set
in interfacejakarta.json.JsonArrayBuilder
-
set
public jakarta.json.JsonArrayBuilder set(int index, BigDecimal value)
- Specified by:
set
in interfacejakarta.json.JsonArrayBuilder
-
set
public jakarta.json.JsonArrayBuilder set(int index, BigInteger value)
- Specified by:
set
in interfacejakarta.json.JsonArrayBuilder
-
set
public jakarta.json.JsonArrayBuilder set(int index, int value)
- Specified by:
set
in interfacejakarta.json.JsonArrayBuilder
-
set
public jakarta.json.JsonArrayBuilder set(int index, long value)
- Specified by:
set
in interfacejakarta.json.JsonArrayBuilder
-
set
public jakarta.json.JsonArrayBuilder set(int index, double value)
- Specified by:
set
in interfacejakarta.json.JsonArrayBuilder
-
set
public jakarta.json.JsonArrayBuilder set(int index, boolean value)
- Specified by:
set
in interfacejakarta.json.JsonArrayBuilder
-
setNull
public jakarta.json.JsonArrayBuilder setNull(int index)
- Specified by:
setNull
in interfacejakarta.json.JsonArrayBuilder
-
set
public jakarta.json.JsonArrayBuilder set(int index, jakarta.json.JsonObjectBuilder builder)
- Specified by:
set
in interfacejakarta.json.JsonArrayBuilder
-
set
public jakarta.json.JsonArrayBuilder set(int index, jakarta.json.JsonArrayBuilder builder)
- Specified by:
set
in interfacejakarta.json.JsonArrayBuilder
-
remove
public jakarta.json.JsonArrayBuilder remove(int index)
- Specified by:
remove
in interfacejakarta.json.JsonArrayBuilder
-
add
public jakarta.json.JsonArrayBuilder add(Object value)
-
add
public jakarta.json.JsonArrayBuilder add(jakarta.json.JsonValue value)
- Specified by:
add
in interfacejakarta.json.JsonArrayBuilder
-
add
public jakarta.json.JsonArrayBuilder add(String value)
- Specified by:
add
in interfacejakarta.json.JsonArrayBuilder
-
add
public jakarta.json.JsonArrayBuilder add(BigDecimal value)
- Specified by:
add
in interfacejakarta.json.JsonArrayBuilder
-
add
public jakarta.json.JsonArrayBuilder add(BigInteger value)
- Specified by:
add
in interfacejakarta.json.JsonArrayBuilder
-
add
public jakarta.json.JsonArrayBuilder add(int value)
- Specified by:
add
in interfacejakarta.json.JsonArrayBuilder
-
add
public jakarta.json.JsonArrayBuilder add(long value)
- Specified by:
add
in interfacejakarta.json.JsonArrayBuilder
-
add
public jakarta.json.JsonArrayBuilder add(double value)
- Specified by:
add
in interfacejakarta.json.JsonArrayBuilder
-
add
public jakarta.json.JsonArrayBuilder add(boolean value)
- Specified by:
add
in interfacejakarta.json.JsonArrayBuilder
-
addNull
public jakarta.json.JsonArrayBuilder addNull()
- Specified by:
addNull
in interfacejakarta.json.JsonArrayBuilder
-
add
public jakarta.json.JsonArrayBuilder add(jakarta.json.JsonObjectBuilder builder)
- Specified by:
add
in interfacejakarta.json.JsonArrayBuilder
-
add
public jakarta.json.JsonArrayBuilder add(jakarta.json.JsonArrayBuilder builder)
- Specified by:
add
in interfacejakarta.json.JsonArrayBuilder
-
setValue
private void setValue(int idx, jakarta.json.JsonValue value)
-
addValue
private void addValue(jakarta.json.JsonValue value)
-
addValue
private void addValue(int idx, jakarta.json.JsonValue value)
-
build
public jakarta.json.JsonArray build()
- Specified by:
build
in interfacejakarta.json.JsonArrayBuilder
-
npe
private static NullPointerException npe()
-
-