Class ArraySettings
java.lang.Object
net.darkhax.pricklemc.common.api.config.property.array.ArraySettings
Settings for an array property. These are modified using the
Array annotation on the field of the value.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ArraySettingsDefault settings that are used when theArrayannotation was not found. -
Constructor Summary
ConstructorsConstructorDescriptionArraySettings(Array meta) Creates a settings object from theArrayannotation. -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if the array can be empty.booleanChecks if complex objects can be inlined.intGets the inline threshold for the array.
-
Field Details
-
DEFAULT
Default settings that are used when theArrayannotation was not found.
-
-
Constructor Details
-
ArraySettings
Creates a settings object from theArrayannotation.- Parameters:
meta- The metadata specified using the annotation.
-
-
Method Details
-
inlineCount
public int inlineCount()Gets the inline threshold for the array. If the length of the array does not surpass this value it can be inlined to a single string.- Returns:
- The inline threshold for the array.
-
inlineComplex
public boolean inlineComplex()Checks if complex objects can be inlined.- Returns:
- If complex values can be inlined.
-
allowEmpty
public boolean allowEmpty()Checks if the array can be empty.- Returns:
- If the array can be empty.
-