Class CollectionArrayProperty<T extends Collection<?>>

Type Parameters:
T - The type of the collection.
All Implemented Interfaces:
IConfigProperty<T>

public class CollectionArrayProperty<T extends Collection<?>> extends AbstractArrayProperty<T>
An array property that can handle Java collections.
  • Field Details

    • ADAPTER

      public static final net.darkhax.pricklemc.common.api.config.property.array.CollectionArrayProperty.Adapter ADAPTER
      A property adapter for Java collections.
  • Method Details

    • isOverInlineThreshold

      public boolean isOverInlineThreshold(T value)
      Description copied from class: AbstractArrayProperty
      Checks if the length of the array value is over the inline threshold.
      Specified by:
      isOverInlineThreshold in class AbstractArrayProperty<T extends Collection<?>>
      Parameters:
      value - The array value.
      Returns:
      If the length of the array value is over the inline threshold.
    • isComplex

      public boolean isComplex(T value)
      Description copied from class: AbstractArrayProperty
      Checks if the array value contains a complex entry.
      Specified by:
      isComplex in class AbstractArrayProperty<T extends Collection<?>>
      Parameters:
      value - The array value.
      Returns:
      If the array value contains a complex entry.
    • isEmpty

      public boolean isEmpty(T value)
      Description copied from class: AbstractArrayProperty
      Checks if the array value is empty.
      Specified by:
      isEmpty in class AbstractArrayProperty<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: AbstractArrayProperty
      Writes entries of the array value to a JSONWriter.
      Specified by:
      writeArrayValues in class AbstractArrayProperty<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.