Interface ParameterType<T>

All Known Implementing Classes:
AttributeFactory.PType, FileParameterType

public interface ParameterType<T>
Type info combined with parameter related methods.
Author:
Nick Collier
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets a StringConverter that can be used to convert objects of this ParameterType to and from strings.
    Gets the Java class associated with this type.
    Gets an initial or default value for a parameter of this type from the string.
  • Method Details

    • getJavaClass

      Class<T> getJavaClass()
      Gets the Java class associated with this type.
      Returns:
      the Java class associated with this type.
    • getValue

      T getValue(String val) throws ParameterFormatException
      Gets an initial or default value for a parameter of this type from the string. If the string is space separated list of values the first value will be used.
      Parameters:
      val - a string representation of default value
      Returns:
      the default value of the string.
      Throws:
      ParameterFormatException - if string cannot be converted into an object of the appropriate type
    • getConverter

      StringConverter<T> getConverter()
      Gets a StringConverter that can be used to convert objects of this ParameterType to and from strings.
      Returns:
      a StringConverter for objects of this parameter type.