Package psiprobe.jsp
Class DurationTag
- java.lang.Object
-
- javax.servlet.jsp.tagext.TagSupport
-
- psiprobe.jsp.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.
-
Constructor Summary
Constructors Constructor Description DurationTag()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
doStartTag()
static String
duration(long value)
Duration.private static String
long2Str(long value)
Long2 str.private static String
long3Str(long value)
Long3 str.void
setValue(long value)
Sets the value.
-
-
-
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.
-
-
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 interfacejavax.servlet.jsp.tagext.Tag
- Overrides:
doStartTag
in classjavax.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
-
-