public final class InputComponents extends Object
InputComponent objects| Modifier and Type | Field and Description |
|---|---|
static char |
DEFAULT_SHORT_NAME |
| Constructor and Description |
|---|
InputComponents() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
areElementsEqual(Iterable<?> iterable1,
Iterable<?> iterable2)
Determines whether two iterables contain equal elements in the same order.
|
static boolean |
areEqual(Object a,
Object b)
Determines whether two possibly-null objects are equal.
|
static Object |
convertToUIInputValue(ConverterFactory converterFactory,
InputComponent<?,?> input,
Object value)
Returns the converted value that matches the input.
|
static <VALUETYPE> |
getCompleterFor(InputComponent<?,VALUETYPE> inputComponent)
Returns the completer associated with this
InputComponent or null if it is not available |
static String |
getInputType(InputComponent<?,?> input) |
static <IMPLTYPE,VALUETYPE> |
getItemLabelConverter(ConverterFactory converterFactory,
SelectComponent<IMPLTYPE,VALUETYPE> input)
Returns the item label converter, that is
|
static String |
getLabelFor(InputComponent<?,?> input,
boolean addColon)
Returns the label for this component
|
static Object |
getValueFor(InputComponent<?,?> component)
Returns the value stored in this
InputComponent. |
static boolean |
hasValue(InputComponent<?,?> input)
Returns if there is a value set for this
InputComponent |
static void |
setDefaultValueFor(ConverterFactory converterFactory,
InputComponent<?,Object> component,
Object value)
Sets the default value in the provided
InputComponent, making any necessary conversions |
static void |
setValueFor(ConverterFactory converterFactory,
InputComponent<?,?> component,
Object value)
Sets the value in the provided
InputComponent, making any necessary conversions |
static String |
validateRequired(InputComponent<?,?> input)
Validate if the input has a value.
|
public static final char DEFAULT_SHORT_NAME
public static String getInputType(InputComponent<?,?> input)
InputType object associated to this InputComponentpublic static Object getValueFor(InputComponent<?,?> component)
InputComponent. null if the component is nullpublic static void setValueFor(ConverterFactory converterFactory, InputComponent<?,?> component, Object value)
InputComponent, making any necessary conversionscomponent - value - public static void setDefaultValueFor(ConverterFactory converterFactory, InputComponent<?,Object> component, Object value)
InputComponent, making any necessary conversionscomponent - value - public static Object convertToUIInputValue(ConverterFactory converterFactory, InputComponent<?,?> input, Object value)
IllegalArgumentException if input is a
SelectComponent and the value cannot be convertedpublic static boolean hasValue(InputComponent<?,?> input)
InputComponentpublic static String validateRequired(InputComponent<?,?> input)
input - public static <IMPLTYPE,VALUETYPE> Converter<VALUETYPE,String> getItemLabelConverter(ConverterFactory converterFactory, SelectComponent<IMPLTYPE,VALUETYPE> input)
converterFactory - May be nullinput - SelectComponent or a Converter instance from the
ConverterFactory parameter if not nullpublic static String getLabelFor(InputComponent<?,?> input, boolean addColon)
input - the input componentaddColon - should a colon be added in the end of the label ?public static <VALUETYPE> UICompleter<VALUETYPE> getCompleterFor(InputComponent<?,VALUETYPE> inputComponent)
InputComponent or null if it is not availableinputComponent - UICompleter associated with this InputComponent or null if not available or the
InputComponent does not implement HasCompleterpublic static boolean areEqual(Object a, Object b)
true if a and b are both null.
true if a and b are both non-null and they are equal according to
Object.equals(Object).
false in all other situations.
This assumes that any non-null objects passed to this function conform to the equals() contract.
public static boolean areElementsEqual(Iterable<?> iterable1, Iterable<?> iterable2)
true if iterable1 and iterable2 contain the same number of elements and every element of
iterable1 is equal to the corresponding element of iterable2.Copyright © 2015 JBoss by Red Hat. All rights reserved.