Plan/all/com/djrapitops/plan/gathering/domain/WorldTimes.html
2020-01-24 12:56:15 +02:00

528 lines
20 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="fi">
<head>
<!-- Generated by javadoc (1.8.0_201) on Fri Jan 24 12:56:09 EET 2020 -->
<title>WorldTimes (Plan 5.0-SNAPSHOT API)</title>
<meta name="date" content="2020-01-24">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="WorldTimes (Plan 5.0-SNAPSHOT API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../com/djrapitops/plan/gathering/domain/UserInfo.html" title="class in com.djrapitops.plan.gathering.domain"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li>Next&nbsp;Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?com/djrapitops/plan/gathering/domain/WorldTimes.html" target="_top">Frames</a></li>
<li><a href="WorldTimes.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">com.djrapitops.plan.gathering.domain</div>
<h2 title="Class WorldTimes" class="title">Class WorldTimes</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>com.djrapitops.plan.gathering.domain.WorldTimes</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="typeNameLabel">WorldTimes</span>
extends java.lang.Object</pre>
<div class="block">Class that tracks the time spent in each World based on GMTimes.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../com/djrapitops/plan/gathering/domain/WorldTimes.html#WorldTimes--">WorldTimes</a></span>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../com/djrapitops/plan/gathering/domain/WorldTimes.html#WorldTimes-java.util.Map-">WorldTimes</a></span>(java.util.Map&lt;java.lang.String,<a href="../../../../../com/djrapitops/plan/gathering/domain/GMTimes.html" title="class in com.djrapitops.plan.gathering.domain">GMTimes</a>&gt;&nbsp;times)</code>
<div class="block">Re-Creates an existing WorldTimes object for viewing.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../com/djrapitops/plan/gathering/domain/WorldTimes.html#WorldTimes-java.lang.String-java.lang.String-long-">WorldTimes</a></span>(java.lang.String&nbsp;startingWorld,
java.lang.String&nbsp;startingGM,
long&nbsp;time)</code>
<div class="block">Creates a new Empty WorldTimes object.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/djrapitops/plan/gathering/domain/WorldTimes.html#add-com.djrapitops.plan.gathering.domain.WorldTimes-">add</a></span>(<a href="../../../../../com/djrapitops/plan/gathering/domain/WorldTimes.html" title="class in com.djrapitops.plan.gathering.domain">WorldTimes</a>&nbsp;toAdd)</code>&nbsp;</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/djrapitops/plan/gathering/domain/WorldTimes.html#contains-java.lang.String-">contains</a></span>(java.lang.String&nbsp;worldName)</code>&nbsp;</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/djrapitops/plan/gathering/domain/WorldTimes.html#equals-java.lang.Object-">equals</a></span>(java.lang.Object&nbsp;o)</code>&nbsp;</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>java.util.Optional&lt;java.lang.String&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/djrapitops/plan/gathering/domain/WorldTimes.html#getCurrentWorld--">getCurrentWorld</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="../../../../../com/djrapitops/plan/gathering/domain/GMTimes.html" title="class in com.djrapitops.plan.gathering.domain">GMTimes</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/djrapitops/plan/gathering/domain/WorldTimes.html#getGMTimes-java.lang.String-">getGMTimes</a></span>(java.lang.String&nbsp;world)</code>
<div class="block">Used for Quick access to time of each GameMode.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/djrapitops/plan/gathering/domain/WorldTimes.html#getTotal--">getTotal</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/djrapitops/plan/gathering/domain/WorldTimes.html#getWorldPlaytime-java.lang.String-">getWorldPlaytime</a></span>(java.lang.String&nbsp;world)</code>
<div class="block">Used to get a total playtime of a world.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>java.util.Map&lt;java.lang.String,<a href="../../../../../com/djrapitops/plan/gathering/domain/GMTimes.html" title="class in com.djrapitops.plan.gathering.domain">GMTimes</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/djrapitops/plan/gathering/domain/WorldTimes.html#getWorldTimes--">getWorldTimes</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/djrapitops/plan/gathering/domain/WorldTimes.html#hashCode--">hashCode</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/djrapitops/plan/gathering/domain/WorldTimes.html#setGMTimesForWorld-java.lang.String-com.djrapitops.plan.gathering.domain.GMTimes-">setGMTimesForWorld</a></span>(java.lang.String&nbsp;world,
<a href="../../../../../com/djrapitops/plan/gathering/domain/GMTimes.html" title="class in com.djrapitops.plan.gathering.domain">GMTimes</a>&nbsp;gmTimes)</code>&nbsp;</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/djrapitops/plan/gathering/domain/WorldTimes.html#toString--">toString</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/djrapitops/plan/gathering/domain/WorldTimes.html#updateState-long-">updateState</a></span>(long&nbsp;changeTime)</code>
<div class="block">Updates the state at the end of the session.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/djrapitops/plan/gathering/domain/WorldTimes.html#updateState-java.lang.String-java.lang.String-long-">updateState</a></span>(java.lang.String&nbsp;worldName,
java.lang.String&nbsp;gameMode,
long&nbsp;changeTime)</code>
<div class="block">Updates the time status to match the new state.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, finalize, getClass, notify, notifyAll, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="WorldTimes-java.lang.String-java.lang.String-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>WorldTimes</h4>
<pre>public&nbsp;WorldTimes(java.lang.String&nbsp;startingWorld,
java.lang.String&nbsp;startingGM,
long&nbsp;time)</pre>
<div class="block">Creates a new Empty WorldTimes object.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>startingWorld</code> - World to start the calculations at.</dd>
<dd><code>startingGM</code> - GameMode to start the calculations at.</dd>
<dd><code>time</code> - Epoch ms the time calculation should start</dd>
</dl>
</li>
</ul>
<a name="WorldTimes-java.util.Map-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>WorldTimes</h4>
<pre>public&nbsp;WorldTimes(java.util.Map&lt;java.lang.String,<a href="../../../../../com/djrapitops/plan/gathering/domain/GMTimes.html" title="class in com.djrapitops.plan.gathering.domain">GMTimes</a>&gt;&nbsp;times)</pre>
<div class="block">Re-Creates an existing WorldTimes object for viewing.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>times</code> - Map of each World's GMTimes object.</dd>
</dl>
</li>
</ul>
<a name="WorldTimes--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>WorldTimes</h4>
<pre>public&nbsp;WorldTimes()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="updateState-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>updateState</h4>
<pre>public&nbsp;void&nbsp;updateState(long&nbsp;changeTime)</pre>
<div class="block">Updates the state at the end of the session.
Does not change world or GameMode.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>changeTime</code> - epoch ms session ended.</dd>
</dl>
</li>
</ul>
<a name="updateState-java.lang.String-java.lang.String-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>updateState</h4>
<pre>public&nbsp;void&nbsp;updateState(java.lang.String&nbsp;worldName,
java.lang.String&nbsp;gameMode,
long&nbsp;changeTime)</pre>
<div class="block">Updates the time status to match the new state.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>worldName</code> - World name of the world swapped to.</dd>
<dd><code>gameMode</code> - GameMode name of the gm swapped to.</dd>
<dd><code>changeTime</code> - Epoch ms the change occurred.</dd>
</dl>
</li>
</ul>
<a name="getWorldPlaytime-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getWorldPlaytime</h4>
<pre>public&nbsp;long&nbsp;getWorldPlaytime(java.lang.String&nbsp;world)</pre>
<div class="block">Used to get a total playtime of a world.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>world</code> - World name being checked.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>total milliseconds spent in a world.</dd>
</dl>
</li>
</ul>
<a name="getTotal--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTotal</h4>
<pre>public&nbsp;long&nbsp;getTotal()</pre>
</li>
</ul>
<a name="getGMTimes-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getGMTimes</h4>
<pre>public&nbsp;<a href="../../../../../com/djrapitops/plan/gathering/domain/GMTimes.html" title="class in com.djrapitops.plan.gathering.domain">GMTimes</a>&nbsp;getGMTimes(java.lang.String&nbsp;world)</pre>
<div class="block">Used for Quick access to time of each GameMode.
<p>
Should not be used for changing state,
because if player has not played in the world,
an empty GMTimes is given, with 0 as playtime</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>world</code> - World name being checked.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>GMTimes object with play times of each GameMode.</dd>
</dl>
</li>
</ul>
<a name="getWorldTimes--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getWorldTimes</h4>
<pre>public&nbsp;java.util.Map&lt;java.lang.String,<a href="../../../../../com/djrapitops/plan/gathering/domain/GMTimes.html" title="class in com.djrapitops.plan.gathering.domain">GMTimes</a>&gt;&nbsp;getWorldTimes()</pre>
</li>
</ul>
<a name="setGMTimesForWorld-java.lang.String-com.djrapitops.plan.gathering.domain.GMTimes-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setGMTimesForWorld</h4>
<pre>public&nbsp;void&nbsp;setGMTimesForWorld(java.lang.String&nbsp;world,
<a href="../../../../../com/djrapitops/plan/gathering/domain/GMTimes.html" title="class in com.djrapitops.plan.gathering.domain">GMTimes</a>&nbsp;gmTimes)</pre>
</li>
</ul>
<a name="equals-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equals</h4>
<pre>public&nbsp;boolean&nbsp;equals(java.lang.Object&nbsp;o)</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>equals</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a name="hashCode--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hashCode</h4>
<pre>public&nbsp;int&nbsp;hashCode()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>hashCode</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a name="toString--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre>public&nbsp;java.lang.String&nbsp;toString()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>toString</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a name="getCurrentWorld--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCurrentWorld</h4>
<pre>public&nbsp;java.util.Optional&lt;java.lang.String&gt;&nbsp;getCurrentWorld()</pre>
</li>
</ul>
<a name="add-com.djrapitops.plan.gathering.domain.WorldTimes-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>add</h4>
<pre>public&nbsp;void&nbsp;add(<a href="../../../../../com/djrapitops/plan/gathering/domain/WorldTimes.html" title="class in com.djrapitops.plan.gathering.domain">WorldTimes</a>&nbsp;toAdd)</pre>
</li>
</ul>
<a name="contains-java.lang.String-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>contains</h4>
<pre>public&nbsp;boolean&nbsp;contains(java.lang.String&nbsp;worldName)</pre>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../com/djrapitops/plan/gathering/domain/UserInfo.html" title="class in com.djrapitops.plan.gathering.domain"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li>Next&nbsp;Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?com/djrapitops/plan/gathering/domain/WorldTimes.html" target="_top">Frames</a></li>
<li><a href="WorldTimes.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>