Class ConfigList


public final class ConfigList extends BaseConfigItem<List<BaseConfigItem<?>>>
Configuration item for a json array for BaseConfigItem.
  • Constructor Details

    • ConfigList

      public ConfigList()
      Creates an empty Array item with no key. Should not be used if adding this item to ConfigGroup The first item added (via addItem(BaseConfigItem)) will set BaseConfigItem.Type of the items stored in the array.
    • ConfigList

      public ConfigList(String key)
      Creates an empty Array item with no key. The first item added (via addItem(BaseConfigItem)) will set BaseConfigItem.Type of the items stored in the array.
      Parameters:
      key - The key to be used if put in a group
    • ConfigList

      public ConfigList(String key, @NotNull @NotNull BaseConfigItem<?> item)
      Creates an Array item with given key and item. Subtype is inferred from given item
      Parameters:
      key - The key to be used if put in a group.
      item - item to add to this array by default.
    • ConfigList

      public ConfigList(@NotNull @NotNull String key, List<BaseConfigItem<?>> items, BaseConfigItem.Type subType)
      Creates an Array item with given key and items null is a valid parameter for items and subType. If items is null at creation, a empty list will be used instead. If subType is null at creation, the first item added (whether by items parameter or addItem(BaseConfigItem)) will set BaseConfigItem.Type of the items stored in the array.
      Parameters:
      key - The key to be used if put in a group.
      items - List of items to add to this array by default.
      subType - The type of this array
      Throws:
      IllegalArgumentException - if an item in the array doesn't match subType
  • Method Details