Class ArrayProperty<T>
java.lang.Object
net.darkhax.pricklemc.common.api.config.property.ObjectProperty<Object>
net.darkhax.pricklemc.common.api.config.property.array.AbstractArrayProperty<Object>
net.darkhax.pricklemc.common.api.config.property.array.ArrayProperty<T>
- Type Parameters:
T- The type of the array.
- All Implemented Interfaces:
IConfigProperty<Object>
An array property that can handle Java arrays.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.darkhax.pricklemc.common.api.config.property.array.ArrayProperty.AdapterThe property adapter for Java arrays.Fields inherited from class net.darkhax.pricklemc.common.api.config.property.array.AbstractArrayProperty
BASIC_TYPESFields inherited from class net.darkhax.pricklemc.common.api.config.property.ObjectProperty
FALLBACK_ADAPTER -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if the array value contains a complex entry.booleanChecks if the array value is empty.booleanisOverInlineThreshold(Object value) Checks if the length of the array value is over the inline threshold.voidwriteArrayValues(Object value, com.google.gson.stream.JsonWriter out, PropertyResolver resolver, org.slf4j.Logger log) Writes entries of the array value to a JSONWriter.Methods inherited from class net.darkhax.pricklemc.common.api.config.property.array.AbstractArrayProperty
settings, validate, writeAdditionalComments, writeValueMethods inherited from class net.darkhax.pricklemc.common.api.config.property.ObjectProperty
comment, defaultValue, read, readValue, value, write, writeDefaultValue, writeDefaultValue
-
Field Details
-
ADAPTER
public static final net.darkhax.pricklemc.common.api.config.property.array.ArrayProperty.Adapter ADAPTERThe property adapter for Java arrays.
-
-
Method Details
-
isOverInlineThreshold
Description copied from class:AbstractArrayPropertyChecks if the length of the array value is over the inline threshold.- Specified by:
isOverInlineThresholdin classAbstractArrayProperty<Object>- Parameters:
value- The array value.- Returns:
- If the length of the array value is over the inline threshold.
-
isComplex
Description copied from class:AbstractArrayPropertyChecks if the array value contains a complex entry.- Specified by:
isComplexin classAbstractArrayProperty<Object>- Parameters:
value- The array value.- Returns:
- If the array value contains a complex entry.
-
isEmpty
Description copied from class:AbstractArrayPropertyChecks if the array value is empty.- Specified by:
isEmptyin classAbstractArrayProperty<Object>- Parameters:
value- The array value.- Returns:
- If the array value is empty.
-
writeArrayValues
public void writeArrayValues(Object value, com.google.gson.stream.JsonWriter out, PropertyResolver resolver, org.slf4j.Logger log) Description copied from class:AbstractArrayPropertyWrites entries of the array value to a JSONWriter.- Specified by:
writeArrayValuesin classAbstractArrayProperty<Object>- Parameters:
value- The array value.out- The JSON writer to write data to.resolver- A resolver for GSON objects and config properties.log- A logger that can be used to display errors and warnings.
-