Package me.hsgamer.bettergui.builder
Class ActionBuilder
- java.lang.Object
-
- me.hsgamer.hscore.builder.MassBuilder<ActionBuilder.Input,Action>
-
- me.hsgamer.bettergui.builder.ActionBuilder
-
public final class ActionBuilder extends MassBuilder<ActionBuilder.Input,Action>
The action builder
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classActionBuilder.InputThe input for the action builder
-
Field Summary
Fields Modifier and Type Field Description static PatternACTION_PATTERNThe pattern for the action.static ActionBuilderINSTANCEThe instance of the action builder
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Action>build(Menu menu, Object object)Build a list of actionsvoidregister(Function<ActionBuilder.Input,Action> creator, String... type)Register a new action creator-
Methods inherited from class me.hsgamer.hscore.builder.MassBuilder
build, buildAll, clear, getElements, register, register, remove
-
-
-
-
Field Detail
-
INSTANCE
public static final ActionBuilder INSTANCE
The instance of the action builder
-
ACTION_PATTERN
public static final Pattern ACTION_PATTERN
The pattern for the action. The format is:<type>(<option>): <value>. Note that the<option>and<value>are optional. Also, the allowed characters of the<type>are alphanumeric,_,-and$. To get the<type>,<option>and<value>, useMatcher.group(int)with the index 1, 3 and 5 respectively.
-
-
Method Detail
-
register
public void register(Function<ActionBuilder.Input,Action> creator, String... type)
Register a new action creator- Parameters:
creator- the creatortype- the type
-
-