Package com.nt.udc.io

Class COSARExprTime2Str

java.lang.Object
com.nt.udc.io.COSARExpr
com.nt.udc.io.COSARExprTime2Str

public class COSARExprTime2Str extends COSARExpr
This class represents the operation used to convert from time_t into a string, according to a format.

The format is defined according to java documentation for SimpleDateFormatter. See http://java.sun.com/products/jdk/1.2/docs/api/index.html

Here are some examples of control characters

  • y year
  • M month
  • d day
  • h hour
  • m minute
  • s second

Characters may be prevented from being interpreted as control characters by enclosing them in single quotes. The format "'Date: ' yy/mm/dd" would result in "Date: 00/01/21" being output.

  • Field Details

  • Constructor Details

  • Method Details

    • eval

      public COSARAttr eval(HashMap symbols) throws Exception
      Description copied from class: COSARExpr
      This function is used to evaluate the expression. A symbol table is passed to help in retrieving the value of referenced symbols. The HashMap should contain values stored as COSARAttr objects, keyed by their associated symbol's name.
      Overrides:
      eval in class COSARExpr
      Returns:
      The expression's value
      Throws:
      Exception
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      A string representation of the OSAR expression