Class CollectionArrayProperty<T extends Collection<?>>
java.lang.Object
net.darkhax.pricklemc.common.api.config.property.ObjectProperty<T>
net.darkhax.pricklemc.common.api.config.property.array.AbstractArrayProperty<T>
net.darkhax.pricklemc.common.api.config.property.array.CollectionArrayProperty<T>
- Type Parameters:
T- The type of the collection.
- All Implemented Interfaces:
IConfigProperty<T>
An array property that can handle Java collections.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.darkhax.pricklemc.common.api.config.property.array.CollectionArrayProperty.AdapterA property adapter for Java collections.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(T value) Checks if the length of the array value is over the inline threshold.voidwriteArrayValues(T 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.CollectionArrayProperty.Adapter ADAPTERA property adapter for Java collections.
-
-
Method Details
-
isOverInlineThreshold
Description copied from class:AbstractArrayPropertyChecks if the length of the array value is over the inline threshold.- Specified by:
isOverInlineThresholdin classAbstractArrayProperty<T extends Collection<?>>- 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<T extends Collection<?>>- 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<T extends Collection<?>>- Parameters:
value- The array value.- Returns:
- If the array value is empty.
-
writeArrayValues
public void writeArrayValues(T 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<T extends Collection<?>>- 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.
-