class_body
{ "{"
line_comment "// running states"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "STATE_UNSTARTED"
= "="
decimal_integer_literal "0"
; ";"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "STATE_RUNNING"
= "="
decimal_integer_literal "1"
; ";"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "STATE_STOPPED"
= "="
decimal_integer_literal "2"
; ";"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "STATE_SUSPENDED"
= "="
decimal_integer_literal "3"
; ";"
line_comment "// split state"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "STATE_UNSPLIT"
= "="
decimal_integer_literal "10"
; ";"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "STATE_SPLIT"
= "="
decimal_integer_literal "11"
; ";"
block_comment "/**\n * The current running state of the StopWatch. \n "...
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "runningState"
= "="
identifier "STATE_UNSTARTED"
; ";"
block_comment "/**\n * Whether the stopwatch has a split time recorded. "...
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "splitState"
= "="
identifier "STATE_UNSPLIT"
; ";"
block_comment "/**\n * The start time.\n */"
field_declaration
modifiers
private "private"
integral_type
long "long"
variable_declarator
identifier "startTime"
= "="
unary_expression
- "-"
decimal_integer_literal "1"
; ";"
block_comment "/**\n * The stop time.\n */"
field_declaration
modifiers
private "private"
integral_type
long "long"
variable_declarator
identifier "stopTime"
= "="
unary_expression
- "-"
decimal_integer_literal "1"
; ";"
block_comment "/**\n * <p>Constructor.</p>\n */"
constructor_declaration
modifiers
public "public"
identifier "StopWatch"
formal_parameters
( "("
) ")"
constructor_body
{ "{"
explicit_constructor_invocation
super "super"
argument_list
( "("
) ")"
; ";"
} "}"
block_comment "/**\n * <p>Start the stopwatch.</p>\n * \n * <p>Thi"...
method_declaration (+96 nodes collapsed)
block_comment "/**\n * <p>Stop the stopwatch.</p>\n * \n * <p>This"...
method_declaration
modifiers
public "public"
void_type "void"
identifier "stop"
formal_parameters
( "("
) ")"
block
{ "{"
if_statement (+37 nodes collapsed)
expression_statement
assignment_expression
identifier "stopTime"
= "="
method_invocation
identifier "System"
. "."
identifier "currentTimeMillis"
argument_list
( "("
) ")"
; ";"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "runningState"
= "="
identifier "STATE_STOPPED"
; ";"
} "}"
block_comment "/**\n * <p>Resets the stopwatch. Stops it if need be. </p"...
method_declaration (+45 nodes collapsed)
block_comment "/**\n * <p>Split the time.</p>\n * \n * <p>This met"...
method_declaration (+60 nodes collapsed)
block_comment "/**\n * <p>Remove a split.</p>\n * \n * <p>This met"...
method_declaration (+56 nodes collapsed)
block_comment "/**\n * <p>Suspend the stopwatch for later resumption.</p"...
method_declaration (+60 nodes collapsed)
block_comment "/**\n * <p>Resume the stopwatch after a suspend.</p>\n "...
method_declaration (+74 nodes collapsed)
block_comment "/**\n * <p>Get the time on the stopwatch.</p>\n * \n "...
method_declaration (+114 nodes collapsed)
block_comment "/**\n * <p>Get the split time on the stopwatch.</p>\n "...
method_declaration (+53 nodes collapsed)
block_comment "/**\n * <p>Gets a summary of the time that the stopwatch "...
method_declaration (+26 nodes collapsed)
block_comment "/**\n * <p>Gets a summary of the split time that the stop"...
method_declaration (+26 nodes collapsed)
} "}"