-
Notifications
You must be signed in to change notification settings - Fork 0
/
CountDownTimer.ctxt
75 lines (75 loc) · 5.96 KB
/
CountDownTimer.ctxt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#BlueJ class context
comment0.target=CountDownTimer
comment1.params=
comment1.target=CountDownTimer()
comment1.text=Default\ constructor\ that\ sets\ the\ CountDownTimer\ to\ zero.
comment10.params=other
comment10.target=int\ compareTo(CountDownTimer)
comment10.text=A\ method\ that\ returns\ 1\ if\ \u201Cthis\u201D\ CountDownTimer\ object\ is\ greater\ than\ the\ other\ CountDownTimer\ object;\ returns\ -1\ if\ the\ \ \n\ \u201Cthis\u201D\ CountDownTimer\ object\ is\ less\ than\ the\ other\ CountDownTimer;\ returns\ 0\ if\ the\ \u201Cthis\u201D\ CountDownTimer\ object\ is\ equal\ \nto\ the\ other\ CountDownTimer\ object.
comment11.params=t1\ t2
comment11.target=int\ compareTo(CountDownTimer,\ CountDownTimer)
comment11.text=A\ method\ that\ returns\ 1\ if\ CountDownTimer\ object\ t1\ is\ greater\ than\ CountDownTimer\ object\ t2;\ returns\ -1\ if\ the\ CountDownTimer\nobject\ t1\ is\ less\ than\ CountDownTimer\ t2;\ returns\ 0\ if\ the\ CountDownTimer\ object\ t1\ is\ equal\ to\ CountDownTimer\ object\ t2.*
comment12.params=nSeconds
comment12.target=void\ sub(int)
comment12.text=A\ method\ that\ subtracts\ the\ number\ of\ seconds\ from\ \u201Cthis\u201D\ CountDownTimer\ object.\ You\ may\ assume\ the\ parameter\ \u201Cseconds\u201D\ is\ positive.
comment13.params=other
comment13.target=void\ sub(CountDownTimer)
comment13.text=A\ method\ that\ subtracts\ CountDownTimer\ other\ from\ the\ \u201Cthis\u201D\ CountDownTimer\ object.
comment14.params=
comment14.target=void\ dec()
comment14.text=A\ method\ that\ decrements\ the\ \u201Cthis\u201D\ CountDownTimer\ by\ 1\ second.
comment15.params=seconds
comment15.target=void\ add(int)
comment15.text=A\ method\ that\ adds\ the\ number\ of\ seconds\ to\ \u201Cthis\u201D\ CountDownTimer\ object.\ You\ may\ assume\ the\ parameter\ \u201Cseconds\u201D\ is\ positive.
comment16.params=other
comment16.target=void\ add(CountDownTimer)
comment16.text=A\ method\ that\ adds\ CountDownTimer\ other\ to\ the\ \u201Cthis\u201D\ CountDownTimer\ object.\ Convert\ the\ \u201Cother\u201D\ CounterDownTimer\ object\ to\ seconds\ \nand\ call\ the\ add\ (int\ seconds)\ method.\ You\ may\ assume\ the\ parameter\ \u201Cseconds\u201D\ is\ positive.
comment17.params=
comment17.target=void\ inc()
comment17.text=A\ method\ that\ increments\ the\ \u201Cthis\u201D\ CountDownTimer\ by\ 1\ second.
comment18.params=
comment18.target=int\ getHours()
comment18.text=Below\ Getters\ are\ redundant,\ used\ for\ debugging.
comment19.params=
comment19.target=int\ getMinutes()
comment19.text=
comment2.params=nhours\ nminutes\ nseconds
comment2.target=CountDownTimer(int,\ int,\ int)
comment2.text=A\ constructor\ that\ initializes\ the\ instance\ variables\ with\ the\ provided\ values.
comment20.params=
comment20.target=int\ getSeconds()
comment20.text=
comment21.params=
comment21.target=java.lang.String\ toString()
comment21.text=A\ method\ that\ returns\ a\ string\ that\ represents\ the\ state\ of\ a\ CountDownTimer\ with\ the\ following\ format\:\ \u201C1\:06\:01\u201D.\ Display\ the\ hours\ \n\ \ \ \ as\ is;\ minutes\ with\ 2\ digits\ including\ a\ leading\ \u201C0\u201D\ if\ minutes\ <\ 10,\ and\ seconds\ with\ 2\ digits\ again\ including\ a\ leading\ \u201C0\u201D\ if\ \nseconds\ <\ 10.\ Other\ examples\:\ \u201C21\:32\:00\u201D,\ \u201C0\:00\:00\u201D.
comment22.params=fileName
comment22.target=void\ save(java.lang.String)
comment22.text=A\ method\ that\ saves\ the\ \u201Cthis\u201D\ CountDownTimer\ to\ a\ file;\ use\ the\ parameter\ filename\ for\ the\ name\ of\ the\ file.
comment23.params=flag
comment23.target=void\ Suspend(java.lang.Boolean)
comment23.text=A\ method\ that\ turns\ \u2018off\u2019\ and\ \u2018on\u2019\ any\ add\ method\ in\ CountDownTimer.\ In\ other\ words,\ when\ the\ flag\ is\ true\ then\ it\ prevents\ any\ add\ \n\ \ \ \ method\ from\ changing\ (mutate)\ the\ state\ of\ the\ \u201Cthis\u201D\ object\ as\ it\ relates\ to\ hours,\ minutes,\ and\ seconds.\ If\ flag\ is\ false,\ then\ \nmutation\ is\ allowed
comment24.params=args
comment24.target=void\ main(java.lang.String[])
comment24.text=
comment3.params=nminutes\ nseconds
comment3.target=CountDownTimer(int,\ int)
comment3.text=A\ constructor\ that\ initializes\ the\ instance\ variables\ with\ the\ provided\ values.\ Initialize\ hours\ to\ 0.*
comment4.params=nseconds
comment4.target=CountDownTimer(int)
comment4.text=A\ constructor\ that\ initializes\ the\ instance\ variables\ with\ the\ provided\ values.\ Initialize\ hours\ and\ minutes\ to\ 0.
comment5.params=other
comment5.target=CountDownTimer(CountDownTimer)
comment5.text=A\ constructor\ that\ initializes\ the\ instance\ variables\ with\ the\ other\ CountDownTimer\ parameter.
comment6.params=nstartTime
comment6.target=CountDownTimer(java.lang.String)
comment6.text=\ A\ constructor\ that\ accepts\ a\ String\ as\ a\ parameter\ with\ the\ following\ format\:\ \u201C1\:21\:30\u201D\ where\ 1\ indicates\ hours,\ \n\ \ \ \ 21\ indicates\ minutes,\ and\ 30\ indicates\ seconds.\ OR\ the\ format\ \u201C15\:20\u201D\ where\ the\ 15\ indicates\ minutes,\ and\ 20\ indicates\ \n\ \ \ \ seconds,\ OR\ the\ format\ \u201C30\u201D\ where\ 30\ indicates\ seconds.\ If\ a\ value\ is\ not\ specified,\ i.e.,\ "",\ then\ it\ is\ set\ to\ zero.\ \nYou\ can\ assume\ the\ input\ has\ no\ errors\ (i.e.,\ a\ valid\ set\ of\ numbers)\ contained\ within.
comment7.params=nstartTime
comment7.target=void\ timerSet(java.lang.String)
comment7.text=
comment8.params=o
comment8.target=boolean\ equals(java.lang.Object)
comment8.text=A\ method\ that\ returns\ true\ if\ \u201Cthis\u201D\ CountDownTimer\ object\ is\ exactly\ the\ same\ (mins\ \=\ other.mins\ &&\ secs\ \=\ other.secs\ &&\ ...)\ \nas\ the\ other\ object\ (Note\:\ you\ must\ cast\ the\ other\ object\ as\ a\ CountDownTimer\ object).
comment9.params=t1\ t2
comment9.target=boolean\ equals(CountDownTimer,\ CountDownTimer)
comment9.text=A\ static\ method\ that\ returns\ true\ if\ CountDownTimer\ object\ t1\ is\ exactly\ the\ same\ as\ CountDownTimer\ object\ t2\ \n(i.e.\ mins\ \=\ other.mins\ &&\ secs\ \=\ other.secs\ &&\ ...).
numComments=25