- java.lang.Object
- 
- aeonics.template.Parameter
 
- 
- All Implemented Interfaces:
- Documented,- Exportable
 
 public class Parameter extends java.lang.Object implements Documented 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classParameter.FormatThis class provides default values that can be used informat(String).static classParameter.RuleThis class provides default values that can be used inrule(Predicate).
 - 
Constructor SummaryConstructors Constructor Description Parameter(java.lang.String name)Creates a new parameter
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanbindable()Returns whether or not this parameter is bindable.<P extends Parameter>
 Pbindable(boolean value)Sets whether or not this parameter is bindable.DatadefaultValue()Returns the default value of this parameter<P extends Parameter>
 PdefaultValue(java.lang.Object value)Defines an optional default value for this parameter.java.lang.Stringdescription()Returns the parameter description<P extends Parameter>
 Pdescription(java.lang.String value)Sets the parameter descriptionDataexport()Renders this class instance to a simple data structure for rendering client-side.java.lang.Stringformat()Returns the parameter expected format.<P extends Parameter>
 Pformat(java.lang.String value)Sets the parameter expected format.intmax()Returns the maximum length of this parameterParametermax(int value)Sets the maximum length of this parameterintmin()Returns the minimum length of this parameterParametermin(int value)Sets the minimum length of this parameterjava.lang.Stringname()Returns the parameter namebooleanoptional()Returns whether or not this parameter allows empty valuesParameteroptional(boolean value)Sets whether or not this parameter allows empty valuesjava.util.function.Predicate<java.lang.String>rule()Returns the validation rule for this parameterParameterrule(java.lang.String value)Sets the validation rule for this parameter as the specified character listParameterrule(java.util.function.Predicate<java.lang.String> value)Sets the validation rule for this parameterjava.lang.Stringsummary()Returns the parameter summary<P extends Parameter>
 Psummary(java.lang.String value)Sets the parameter summarybooleanvalidate(Data value)Validates the provided value against thevalidator()of this parameterjava.util.function.Predicate<Data>validator()Returns the validator for this parameter.<P extends Parameter>
 Pvalidator(java.util.function.Predicate<Data> value)Sets the validator for this parameter.java.util.Set<java.lang.String>values()Returns the set of acceptable valuesParametervalues(java.lang.String... values)Sets the acceptable values.
 
- 
- 
- 
Method Detail- 
namepublic java.lang.String name() Returns the parameter name- Specified by:
- namein interface- Documented
- Returns:
- the parameter name
 
 - 
summarypublic java.lang.String summary() Returns the parameter summary- Specified by:
- summaryin interface- Documented
- Returns:
- the parameter summary
 
 - 
summarypublic <P extends Parameter> P summary(java.lang.String value) Sets the parameter summary- Type Parameters:
- P- this parameter type
- Parameters:
- value- the summary
- Returns:
- this
 
 - 
formatpublic java.lang.String format() Returns the parameter expected format. The parameter format is just an indication on how the parameter should be formatted and/or displayed to the user. There is no automaticrule()that match the format, you should set both.- Returns:
- the parameter expected format
 
 - 
formatpublic <P extends Parameter> P format(java.lang.String value) Sets the parameter expected format. The parameter format is just an indication on how the parameter should be formatted and/or displayed to the user. There is no automaticrule()that match the format, you should set both.- Type Parameters:
- P- this parameter type
- Parameters:
- value- the expected format
- Returns:
- this
 
 - 
descriptionpublic java.lang.String description() Returns the parameter description- Specified by:
- descriptionin interface- Documented
- Returns:
- the parameter description
 
 - 
descriptionpublic <P extends Parameter> P description(java.lang.String value) Sets the parameter description- Type Parameters:
- P- this parameter type
- Parameters:
- value- the description
- Returns:
- this
 
 - 
bindablepublic boolean bindable() Returns whether or not this parameter is bindable.- Returns:
- whether or not this parameter is bindable
- See Also:
- bindable(boolean)
 
 - 
bindablepublic <P extends Parameter> P bindable(boolean value) Sets whether or not this parameter is bindable. Bindable parameters may contain${...}constructs that will be substituted at runtime depending on the context, or the configuration.- Type Parameters:
- P- this parameter type
- Parameters:
- value- whether or not to perform binding at runtime
- Returns:
- this
 
 - 
validatepublic boolean validate(Data value) Validates the provided value against thevalidator()of this parameter- Parameters:
- value- the value to validate
- Returns:
- true if the value is valid for this parameter, false otherwise
 
 - 
validatorpublic java.util.function.Predicate<Data> validator() Returns the validator for this parameter.The default validator is checking the toString()representation with regard to thedefaultValue(),optional(),min(),max(),values()andrule().If you need a custom validation, then you should set one using validator(Predicate).- Returns:
- the validator for this parameter
 
 - 
validatorpublic <P extends Parameter> P validator(java.util.function.Predicate<Data> value) Sets the validator for this parameter.This method will replace the default validator so no other checks other than the one provided will be performed. - Type Parameters:
- P- this parameter type
- Parameters:
- value- the validator for this parameter
- Returns:
- this
 
 - 
defaultValuepublic Data defaultValue() Returns the default value of this parameter- Returns:
- the default value of this parameter
 
 - 
defaultValuepublic <P extends Parameter> P defaultValue(java.lang.Object value) Defines an optional default value for this parameter.- Type Parameters:
- P- this parameter type
- Parameters:
- value- the default value
- Returns:
- this
 
 - 
optionalpublic boolean optional() Returns whether or not this parameter allows empty values- Returns:
- true if this parameter allows empty values
 
 - 
optionalpublic Parameter optional(boolean value) Sets whether or not this parameter allows empty values- Parameters:
- value- whether or not this parameter allows empty values
- Returns:
- this
 
 - 
minpublic int min() Returns the minimum length of this parameter- Returns:
- the minimum length of this parameter
 
 - 
minpublic Parameter min(int value) Sets the minimum length of this parameter- Parameters:
- value- the minimum length of this parameter
- Returns:
- this
 
 - 
maxpublic int max() Returns the maximum length of this parameter- Returns:
- the maximum length of this parameter
 
 - 
maxpublic Parameter max(int value) Sets the maximum length of this parameter- Parameters:
- value- the maximum length of this parameter
- Returns:
- this
 
 - 
valuespublic java.util.Set<java.lang.String> values() Returns the set of acceptable values- Returns:
- the set of acceptable values
 
 - 
valuespublic Parameter values(java.lang.String... values) Sets the acceptable values. This method overrides the existing acceptables values with the ones provided.- Parameters:
- values- the acceptable values
- Returns:
- this
 
 - 
rulepublic java.util.function.Predicate<java.lang.String> rule() Returns the validation rule for this parameter- Returns:
- the validation rule for this parameter
 
 - 
rulepublic Parameter rule(java.util.function.Predicate<java.lang.String> value) Sets the validation rule for this parameter- Parameters:
- value- the validation rule for this parameter
- Returns:
- this
 
 - 
rulepublic Parameter rule(java.lang.String value) Sets the validation rule for this parameter as the specified character list- Parameters:
- value- the list of allowed characters
- Returns:
- this
 
 - 
exportpublic Data export() Description copied from interface:ExportableRenders this class instance to a simple data structure for rendering client-side.- Specified by:
- exportin interface- Documented
- Specified by:
- exportin interface- Exportable
- Returns:
- a public data representation of this class instance
 
 
- 
 
-