Class WekaPropertyValueConverter

  • All Implemented Interfaces:
    Serializable

    public class WekaPropertyValueConverter
    extends AbstractPropertyValueConverter
    Handler for WEKA classes. Values for arrays are assumed to be blank-separated strings (one element per array value).
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

    • Constructor Detail

      • WekaPropertyValueConverter

        public WekaPropertyValueConverter()
    • Method Detail

      • handles

        public boolean handles​(Class cls)
        Checks whether this converter handles the particular class.
        Specified by:
        handles in class AbstractPropertyValueConverter
        Parameters:
        cls - the class to check
        Returns:
        true if it supports it
      • convert

        public Object convert​(Class cls,
                              String value)
                       throws Exception
        Converts the variable value into the appropriate object, if possible.
        Specified by:
        convert in class AbstractPropertyValueConverter
        Parameters:
        cls - the type of the property
        value - the string to convert
        Returns:
        the converted value or null if it cannot be converted
        Throws:
        Exception - if conversion fails with an error