1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5 <!-- Generated by javadoc (1.8.0_191) on Thu Mar 28 11:26:59 PDT 2019 -->
6 <title>TriggerTimesFileReader</title>
7 <meta name="date" content="2019-03-28">
8 <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
9 <script type="text/javascript" src="../../../../script.js"></script>
12 <script type="text/javascript"><!--
14 if (location.href.indexOf('is-external=true') == -1) {
15 parent.document.title="TriggerTimesFileReader";
21 var methods = {"i0":10,"i1":10};
22 var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
23 var altColor = "altColor";
24 var rowColor = "rowColor";
25 var tableTab = "tableTab";
26 var activeTableTab = "activeTableTab";
29 <div>JavaScript is disabled on your browser.</div>
31 <!-- ========= START OF TOP NAVBAR ======= -->
32 <div class="topNav"><a name="navbar.top">
35 <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
36 <a name="navbar.top.firstrow">
39 <ul class="navList" title="Navigation">
40 <li><a href="../../../../overview-summary.html">Overview</a></li>
41 <li><a href="package-summary.html">Package</a></li>
42 <li class="navBarCell1Rev">Class</li>
43 <li><a href="package-tree.html">Tree</a></li>
44 <li><a href="../../../../deprecated-list.html">Deprecated</a></li>
45 <li><a href="../../../../index-files/index-1.html">Index</a></li>
46 <li><a href="../../../../help-doc.html">Help</a></li>
51 <li><a href="../../../../edu/uci/iotproject/io/PrintWriterUtils.html" title="class in edu.uci.iotproject.io"><span class="typeNameLink">Prev Class</span></a></li>
52 <li>Next Class</li>
55 <li><a href="../../../../index.html?edu/uci/iotproject/io/TriggerTimesFileReader.html" target="_top">Frames</a></li>
56 <li><a href="TriggerTimesFileReader.html" target="_top">No Frames</a></li>
58 <ul class="navList" id="allclasses_navbar_top">
59 <li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
62 <script type="text/javascript"><!--
63 allClassesLink = document.getElementById("allclasses_navbar_top");
65 allClassesLink.style.display = "block";
68 allClassesLink.style.display = "none";
74 <ul class="subNavList">
75 <li>Summary: </li>
76 <li>Nested | </li>
77 <li><a href="#field.summary">Field</a> | </li>
78 <li><a href="#constructor.summary">Constr</a> | </li>
79 <li><a href="#method.summary">Method</a></li>
81 <ul class="subNavList">
82 <li>Detail: </li>
83 <li><a href="#field.detail">Field</a> | </li>
84 <li><a href="#constructor.detail">Constr</a> | </li>
85 <li><a href="#method.detail">Method</a></li>
88 <a name="skip.navbar.top">
91 <!-- ========= END OF TOP NAVBAR ========= -->
92 <!-- ======== START OF CLASS DATA ======== -->
94 <div class="subTitle">edu.uci.iotproject.io</div>
95 <h2 title="Class TriggerTimesFileReader" class="title">Class TriggerTimesFileReader</h2>
97 <div class="contentContainer">
98 <ul class="inheritance">
99 <li>java.lang.Object</li>
101 <ul class="inheritance">
102 <li>edu.uci.iotproject.io.TriggerTimesFileReader</li>
106 <div class="description">
107 <ul class="blockList">
108 <li class="blockList">
111 <pre>public class <span class="typeNameLabel">TriggerTimesFileReader</span>
112 extends java.lang.Object</pre>
113 <div class="block">Parses a file to obtain the timestamps at which the smart plug was toggled on/off.</div>
117 <div class="summary">
118 <ul class="blockList">
119 <li class="blockList">
120 <!-- =========== FIELD SUMMARY =========== -->
121 <ul class="blockList">
122 <li class="blockList"><a name="field.summary">
125 <h3>Field Summary</h3>
126 <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
127 <caption><span>Fields</span><span class="tabEnd"> </span></caption>
129 <th class="colFirst" scope="col">Modifier and Type</th>
130 <th class="colLast" scope="col">Field and Description</th>
132 <tr class="altColor">
133 <td class="colFirst"><code>static java.time.ZoneId</code></td>
134 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../edu/uci/iotproject/io/TriggerTimesFileReader.html#ZONE_ID_BUDAPEST">ZONE_ID_BUDAPEST</a></span></code> </td>
136 <tr class="rowColor">
137 <td class="colFirst"><code>static java.time.ZoneId</code></td>
138 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../edu/uci/iotproject/io/TriggerTimesFileReader.html#ZONE_ID_LOS_ANGELES">ZONE_ID_LOS_ANGELES</a></span></code> </td>
143 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
144 <ul class="blockList">
145 <li class="blockList"><a name="constructor.summary">
148 <h3>Constructor Summary</h3>
149 <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
150 <caption><span>Constructors</span><span class="tabEnd"> </span></caption>
152 <th class="colOne" scope="col">Constructor and Description</th>
154 <tr class="altColor">
155 <td class="colOne"><code><span class="memberNameLink"><a href="../../../../edu/uci/iotproject/io/TriggerTimesFileReader.html#TriggerTimesFileReader--">TriggerTimesFileReader</a></span>()</code> </td>
160 <!-- ========== METHOD SUMMARY =========== -->
161 <ul class="blockList">
162 <li class="blockList"><a name="method.summary">
165 <h3>Method Summary</h3>
166 <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
167 <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption>
169 <th class="colFirst" scope="col">Modifier and Type</th>
170 <th class="colLast" scope="col">Method and Description</th>
172 <tr id="i0" class="altColor">
173 <td class="colFirst"><code>java.time.Instant</code></td>
174 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../edu/uci/iotproject/io/TriggerTimesFileReader.html#parseTriggerTimestamp-java.lang.String-boolean-">parseTriggerTimestamp</a></span>(java.lang.String timestampStr,
175 boolean _24hFormat)</code>
176 <div class="block">Parses a timestamp string to an <code>Instant</code> (UTC).</div>
179 <tr id="i1" class="rowColor">
180 <td class="colFirst"><code>java.util.List<java.time.Instant></code></td>
181 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../edu/uci/iotproject/io/TriggerTimesFileReader.html#readTriggerTimes-java.lang.String-boolean-">readTriggerTimes</a></span>(java.lang.String fileName,
182 boolean _24hFormat)</code>
183 <div class="block">Reads a file with trigger timestamps and parses the timestamps into <code>Instant</code>s using the rules specified
184 by <a href="../../../../edu/uci/iotproject/io/TriggerTimesFileReader.html#parseTriggerTimestamp-java.lang.String-boolean-"><code>parseTriggerTimestamp(String, boolean)</code></a>.</div>
188 <ul class="blockList">
189 <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
192 <h3>Methods inherited from class java.lang.Object</h3>
193 <code>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
200 <div class="details">
201 <ul class="blockList">
202 <li class="blockList">
203 <!-- ============ FIELD DETAIL =========== -->
204 <ul class="blockList">
205 <li class="blockList"><a name="field.detail">
208 <h3>Field Detail</h3>
209 <a name="ZONE_ID_LOS_ANGELES">
212 <ul class="blockList">
213 <li class="blockList">
214 <h4>ZONE_ID_LOS_ANGELES</h4>
215 <pre>public static final java.time.ZoneId ZONE_ID_LOS_ANGELES</pre>
218 <a name="ZONE_ID_BUDAPEST">
221 <ul class="blockListLast">
222 <li class="blockList">
223 <h4>ZONE_ID_BUDAPEST</h4>
224 <pre>public static final java.time.ZoneId ZONE_ID_BUDAPEST</pre>
229 <!-- ========= CONSTRUCTOR DETAIL ======== -->
230 <ul class="blockList">
231 <li class="blockList"><a name="constructor.detail">
234 <h3>Constructor Detail</h3>
235 <a name="TriggerTimesFileReader--">
238 <ul class="blockListLast">
239 <li class="blockList">
240 <h4>TriggerTimesFileReader</h4>
241 <pre>public TriggerTimesFileReader()</pre>
246 <!-- ============ METHOD DETAIL ========== -->
247 <ul class="blockList">
248 <li class="blockList"><a name="method.detail">
251 <h3>Method Detail</h3>
252 <a name="readTriggerTimes-java.lang.String-boolean-">
255 <ul class="blockList">
256 <li class="blockList">
257 <h4>readTriggerTimes</h4>
258 <pre>public java.util.List<java.time.Instant> readTriggerTimes(java.lang.String fileName,
259 boolean _24hFormat)</pre>
260 <div class="block">Reads a file with trigger timestamps and parses the timestamps into <code>Instant</code>s using the rules specified
261 by <a href="../../../../edu/uci/iotproject/io/TriggerTimesFileReader.html#parseTriggerTimestamp-java.lang.String-boolean-"><code>parseTriggerTimestamp(String, boolean)</code></a>.</div>
263 <dt><span class="paramLabel">Parameters:</span></dt>
264 <dd><code>fileName</code> - The absolute path to the file with trigger timestamps.</dd>
265 <dd><code>_24hFormat</code> - <code>true</code> if the timestamps in the file are in 24 hour format, <code>false</code> if they are in
267 <dt><span class="returnLabel">Returns:</span></dt>
268 <dd>A containing the trigger timestamps represented as <code>Instant</code>s.</dd>
272 <a name="parseTriggerTimestamp-java.lang.String-boolean-">
275 <ul class="blockListLast">
276 <li class="blockList">
277 <h4>parseTriggerTimestamp</h4>
278 <pre>public java.time.Instant parseTriggerTimestamp(java.lang.String timestampStr,
279 boolean _24hFormat)</pre>
280 <div class="block">Parses a timestamp string to an <code>Instant</code> (UTC). Assumes timestamps are LA time.
281 Format is expected to be either "MM/dd/uuuu HH:mm:ss" or "MM/dd/uuuu h:mm:ss a".</div>
283 <dt><span class="paramLabel">Parameters:</span></dt>
284 <dd><code>timestampStr</code> - The string containing a date-time timestamp for LA's timezone.</dd>
285 <dd><code>_24hFormat</code> - <code>true</code> if the time in <code>timestampStr</code> is given in 24 hour format, <code>false</code> if
286 it is given in AM/PM format.</dd>
287 <dt><span class="returnLabel">Returns:</span></dt>
288 <dd>An <code>Instant</code> representation of the parsed timestamp. Note that the <code>Instant</code> marks a point on
289 the timeline in UTC. Use <code>Instant.atZone(ZoneId)</code> to convert to the corresponding time in a given
300 <!-- ========= END OF CLASS DATA ========= -->
301 <!-- ======= START OF BOTTOM NAVBAR ====== -->
302 <div class="bottomNav"><a name="navbar.bottom">
305 <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
306 <a name="navbar.bottom.firstrow">
309 <ul class="navList" title="Navigation">
310 <li><a href="../../../../overview-summary.html">Overview</a></li>
311 <li><a href="package-summary.html">Package</a></li>
312 <li class="navBarCell1Rev">Class</li>
313 <li><a href="package-tree.html">Tree</a></li>
314 <li><a href="../../../../deprecated-list.html">Deprecated</a></li>
315 <li><a href="../../../../index-files/index-1.html">Index</a></li>
316 <li><a href="../../../../help-doc.html">Help</a></li>
321 <li><a href="../../../../edu/uci/iotproject/io/PrintWriterUtils.html" title="class in edu.uci.iotproject.io"><span class="typeNameLink">Prev Class</span></a></li>
322 <li>Next Class</li>
325 <li><a href="../../../../index.html?edu/uci/iotproject/io/TriggerTimesFileReader.html" target="_top">Frames</a></li>
326 <li><a href="TriggerTimesFileReader.html" target="_top">No Frames</a></li>
328 <ul class="navList" id="allclasses_navbar_bottom">
329 <li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
332 <script type="text/javascript"><!--
333 allClassesLink = document.getElementById("allclasses_navbar_bottom");
335 allClassesLink.style.display = "block";
338 allClassesLink.style.display = "none";
344 <ul class="subNavList">
345 <li>Summary: </li>
346 <li>Nested | </li>
347 <li><a href="#field.summary">Field</a> | </li>
348 <li><a href="#constructor.summary">Constr</a> | </li>
349 <li><a href="#method.summary">Method</a></li>
351 <ul class="subNavList">
352 <li>Detail: </li>
353 <li><a href="#field.detail">Field</a> | </li>
354 <li><a href="#constructor.detail">Constr</a> | </li>
355 <li><a href="#method.detail">Method</a></li>
358 <a name="skip.navbar.bottom">
361 <!-- ======== END OF BOTTOM NAVBAR ======= -->