Class ValueSet

java.lang.Object
com.bc.ceres.binding.ValueSet

public class ValueSet extends Object
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 Details

    • ValueSet

      public ValueSet(Object[] items)
  • Method Details

    • getItems

      public Object[] getItems()
    • contains

      public boolean contains(Object value)
    • 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.