Interface Value

  • All Known Implementing Classes:
    SimpleValue

    public interface Value
    Wraps a value from a data source such as a CSV to simplify conversion to typed values. May be done by parsing a lexical form or may be wrapped source which natively supports typed values (e.g. Excel).
    Version:
    $Revision: $
    Author:
    Dave Reynolds
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      long asInt()
      Return value as a (long) int if possible, otherwise ModalException
      boolean empty()
      Return true unless the value is null or an empty string
      String getLexical()
      Original lexical form for the value
      Object getValue()
      Return the value unconverted.
      boolean isInt()
      Test if the value can be treated as a (long) int
      boolean notEmpty()
      Return true if the value is non-null and not an empty string
      String str()
      Original lexical form for the value, Ruby-friendly alias
    • Method Detail

      • getLexical

        String getLexical()
        Original lexical form for the value
      • str

        String str()
        Original lexical form for the value, Ruby-friendly alias
      • notEmpty

        boolean notEmpty()
        Return true if the value is non-null and not an empty string
      • empty

        boolean empty()
        Return true unless the value is null or an empty string
      • getValue

        Object getValue()
        Return the value unconverted. For CVS source data this will be the lexical form. For values injected by other sources may be any java Object including boxed Integers etc
      • asInt

        long asInt()
        Return value as a (long) int if possible, otherwise ModalException
      • isInt

        boolean isInt()
        Test if the value can be treated as a (long) int