Interface StringConverter<T>

All Known Implementing Classes:
FileParameterType, QuantityConverter, StringConverterFactory.BooleanConverter, StringConverterFactory.ByteConverter, StringConverterFactory.DoubleConverter, StringConverterFactory.FloatConverter, StringConverterFactory.IntConverter, StringConverterFactory.LongConverter, StringConverterFactory.ShortConverter, StringConverterFactory.StringStringConverter

public interface StringConverter<T>
Converts an Object to and from a String representation. Subclasses are specialized for specified objects.
Author:
Nick Collier
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates an Object from a String representation.
    toString(T obj)
    Converts the specified object to a String representation and returns that representation.
  • Method Details

    • toString

      String toString(T obj)
      Converts the specified object to a String representation and returns that representation. The represenation should be such that fromString can recreate the Object.
      Parameters:
      obj - the Object to convert.
      Returns:
      a String representation of the Object.
    • fromString

      T fromString(String strRep)
      Creates an Object from a String representation.
      Parameters:
      strRep - the string representation
      Returns:
      the created Object.