Package psiprobe.jsp

Class DurationTag

  • All Implemented Interfaces:
    Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

    public class DurationTag
    extends javax.servlet.jsp.tagext.TagSupport
    Silly JSP tag to display duration in milliseconds as hours:minutes:seconds.milliseconds
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static org.slf4j.Logger logger
      The Constant logger.
      private static long serialVersionUID
      The Constant serialVersionUID.
      private long value
      The value.
      • Fields inherited from class javax.servlet.jsp.tagext.TagSupport

        id, pageContext
      • Fields inherited from interface javax.servlet.jsp.tagext.IterationTag

        EVAL_BODY_AGAIN
      • Fields inherited from interface javax.servlet.jsp.tagext.Tag

        EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
    • Constructor Summary

      Constructors 
      Constructor Description
      DurationTag()  
    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        The Constant serialVersionUID.
        See Also:
        Constant Field Values
      • logger

        private static final org.slf4j.Logger logger
        The Constant logger.
      • value

        private long value
        The value.
    • Constructor Detail

      • DurationTag

        public DurationTag()
    • Method Detail

      • setValue

        public void setValue​(long value)
        Sets the value.
        Parameters:
        value - the new value
      • doStartTag

        public int doStartTag()
                       throws javax.servlet.jsp.JspException
        Specified by:
        doStartTag in interface javax.servlet.jsp.tagext.Tag
        Overrides:
        doStartTag in class javax.servlet.jsp.tagext.TagSupport
        Throws:
        javax.servlet.jsp.JspException
      • duration

        public static String duration​(long value)
        Duration.
        Parameters:
        value - the value
        Returns:
        the string
      • long2Str

        private static String long2Str​(long value)
        Long2 str.
        Parameters:
        value - the value
        Returns:
        the string
      • long3Str

        private static String long3Str​(long value)
        Long3 str.
        Parameters:
        value - the value
        Returns:
        the string