Package com.impossibl.postgres.system
Class Setting.Group
- java.lang.Object
-
- com.impossibl.postgres.system.Setting.Group
-
public static class Setting.Group extends java.lang.ObjectSetting 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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceSetting.Group.InfoGroup definition annotation.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Setting<T>add(Setting<T> setting)Adds a previously declared setting to this group.static Setting.Groupdeclare()Forward declare a group that will be initialized by annotation processing.static java.util.Map<java.lang.String,Setting.Group>getAll()Name base map of all defined setting groupsjava.util.Map<java.lang.String,Setting<?>>getAllNamedSettings()Retrieves a names based map of all settings in the groupjava.util.Set<Setting<?>>getAllSettings()Retrieves a unique set of all settings in the group.java.lang.StringgetDescription()Get description of groupjava.lang.StringgetName()Get name of groupvoidinit(java.lang.String name, java.lang.String description, boolean global)Initialize a previouslydeclaredgroup.java.lang.StringtoString()
-
-
-
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 java.util.Map<java.lang.String,Setting.Group> getAll()
Name base map of all defined setting groups- Returns:
- Map of defined setting groups
-
init
public void init(java.lang.String name, java.lang.String description, boolean global)Initialize a previouslydeclaredgroup.
-
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 java.lang.String getName()
Get name of group- Returns:
- Name of group
-
getDescription
public java.lang.String getDescription()
Get description of group- Returns:
- Description of group
-
getAllNamedSettings
public java.util.Map<java.lang.String,Setting<?>> getAllNamedSettings()
Retrieves a names based map of all settings in the group- Returns:
- Map of all settings.
-
getAllSettings
public java.util.Set<Setting<?>> getAllSettings()
Retrieves a unique set of all settings in the group.- Returns:
- Set of all settings.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-