Package org.moddingx.libx.config.gui
Interface InputProperties<T>
public interface InputProperties<T>
Defines which input is valid and how to convert input for text input editors.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final InputProperties<String>
Input properties for a plain string. -
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
canInputChar
(char chr) Gets whether the user can enter the given char into the input field.gets the default value for newly created inputs that have no other default value available.default boolean
Gets whether a given user input is valid or not.default String
Converts a value matching this input properties to a string.Converts some input into a value matching this input properties.
-
Field Details
-
PLAIN
Input properties for a plain string.
-
-
Method Details
-
defaultValue
T defaultValue()gets the default value for newly created inputs that have no other default value available. -
valueOf
Converts some input into a value matching this input properties. This may fail with an exception only ifisValid(String)
returnsfalse
for the same input. -
toString
Converts a value matching this input properties to a string. -
canInputChar
default boolean canInputChar(char chr) Gets whether the user can enter the given char into the input field. -
isValid
Gets whether a given user input is valid or not.
-