Package com.bc.ceres.binding
Class ValueSet
java.lang.Object
com.bc.ceres.binding.ValueSet
A set of values allowed to be assigned to certain types of values. This set
can be a property of a
PropertyDescriptor
.- Since:
- 0.6
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Object[]
getItems()
static ValueSet
parseValueSet
(String[] valueStrings, Converter itemConverter) Converts a string array into a value set.static ValueSet
parseValueSet
(String text, Class<?> itemType) Converts a comma-separated text string into a value set.
-
Constructor Details
-
ValueSet
-
-
Method Details
-
getItems
-
contains
-
parseValueSet
public static ValueSet parseValueSet(String text, Class<?> itemType) throws IllegalArgumentException Converts a comma-separated text string into a value set.- Parameters:
text
- The textual representation of the value set. Commas in values must be escaped using UNICODE character encoding.itemType
- The type of the value set's items.- Returns:
- The value set.
- Throws:
IllegalArgumentException
- If the text has an invalid format.
-
parseValueSet
public static ValueSet parseValueSet(String[] valueStrings, Converter itemConverter) throws ConversionException Converts a string array into a value set.- Parameters:
valueStrings
- The textual representation of the items of the value set.itemConverter
- The converter to be used for the item conversion.- Returns:
- The value set.
- Throws:
ConversionException
- If the conversion of one of the items fails.
-