Class Setting.Group

  • Enclosing class:
    Setting<T>

    public static class Setting.Group
    extends Object
    Setting group. A group can be global or local. All settings in a global group are required to be unique system wide, while settings in a local group only need to be unique within the group. Nothing else is unique about local groups.
    • Constructor Detail

      • Group

        public Group​(String name,
                     String description,
                     boolean global)
    • Method Detail

      • declare

        public static Setting.Group declare()
        Forward declare a group that will be initialized by annotation processing.
        Returns:
        Uninitialized group instance
        See Also:
        Setting
      • getAll

        public static Map<String,​Setting.Group> getAll()
        Name base map of all defined setting groups
        Returns:
        Map of defined setting groups
      • init

        public void init​(String name,
                         String description,
                         boolean global)
        Initialize a previously declared group.
      • add

        public <T> Setting<T> add​(Setting<T> setting)
        Adds a previously declared setting to this group. Allows adding a setting with the same name to multiple global groups without conflict.
      • getName

        public String getName()
        Get name of group
        Returns:
        Name of group
      • getDescription

        public String getDescription()
        Get description of group
        Returns:
        Description of group
      • getAllNamedSettings

        public Map<String,​Setting<?>> getAllNamedSettings()
        Retrieves a names based map of all settings in the group
        Returns:
        Map of all settings.
      • getAllOwnedSettings

        public Set<Setting<?>> getAllOwnedSettings()
        Retrieves a unique set of all settings owned by the group.
        Returns:
        Set of all settings.
      • getAllSettings

        public Set<Setting<?>> getAllSettings()
        Retrieves a unique set of all settings in the group.
        Returns:
        Set of all settings.