SubServers-2/Javadoc/SubServers.Client.Bukkit/net/ME1312/SubServers/Client/Bukkit/Library/Util.html
2017-02-05 17:03:17 -05:00

457 lines
17 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>Util (SubServers.Client.Bukkit)</title>
<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="Util (SubServers.Client.Bukkit)";
}
}
catch(err) {
}
//-->
var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static 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="../../../../../../net/ME1312/SubServers/Client/Bukkit/Library/UniversalFile.html" title="class in net.ME1312.SubServers.Client.Bukkit.Library"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Library/Util.ExceptionRunnable.html" title="interface in net.ME1312.SubServers.Client.Bukkit.Library"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?net/ME1312/SubServers/Client/Bukkit/Library/Util.html" target="_top">Frames</a></li>
<li><a href="Util.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><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&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>Constr&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">net.ME1312.SubServers.Client.Bukkit.Library</div>
<h2 title="Class Util" class="title">Class Util</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>net.ME1312.SubServers.Client.Bukkit.Library.Util</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public final class <span class="typeNameLabel">Util</span>
extends java.lang.Object</pre>
<div class="block">SubServers Utility Class</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Library/Util.ExceptionRunnable.html" title="interface in net.ME1312.SubServers.Client.Bukkit.Library">Util.ExceptionRunnable</a></span></code>&nbsp;</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="t1" class="tableTab"><span><a href="javascript:show(1);">Static 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>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Library/Util.html#copyDirectory-java.io.File-java.io.File-">copyDirectory</a></span>(java.io.File&nbsp;from,
java.io.File&nbsp;to)</code>
<div class="block">Copy a Directory</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Library/Util.html#copyFromJar-java.lang.ClassLoader-java.lang.String-java.lang.String-">copyFromJar</a></span>(java.lang.ClassLoader&nbsp;loader,
java.lang.String&nbsp;resource,
java.lang.String&nbsp;destination)</code>
<div class="block">Copy from the Class Loader</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Library/Util.html#deleteDirectory-java.io.File-">deleteDirectory</a></span>(java.io.File&nbsp;folder)</code>
<div class="block">Delete a Directory</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static &lt;K,V&gt;&nbsp;java.util.List&lt;K&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Library/Util.html#getBackwards-java.util.Map-V-">getBackwards</a></span>(java.util.Map&lt;K,V&gt;&nbsp;map,
V&nbsp;value)</code>
<div class="block">Get keys by value from map</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Library/Util.html#isException-net.ME1312.SubServers.Client.Bukkit.Library.Util.ExceptionRunnable-">isException</a></span>(<a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Library/Util.ExceptionRunnable.html" title="interface in net.ME1312.SubServers.Client.Bukkit.Library">Util.ExceptionRunnable</a>&nbsp;runnable)</code>
<div class="block">Determines if an Exception will occur</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Library/Util.html#isNull-java.lang.Object...-">isNull</a></span>(java.lang.Object...&nbsp;values)</code>
<div class="block">Checks values to make sure they're not null</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Library/Util.html#random-int-int-">random</a></span>(int&nbsp;min,
int&nbsp;max)</code>
<div class="block">Get a Random Integer</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Library/Util.html#readAll-java.io.Reader-">readAll</a></span>(java.io.Reader&nbsp;rd)</code>
<div class="block">Read Everything from Reader</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Library/Util.html#unescapeJavaString-java.lang.String-">unescapeJavaString</a></span>(java.lang.String&nbsp;str)</code>
<div class="block">Parse escapes in a Java String</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>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="isNull-java.lang.Object...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isNull</h4>
<pre>public static&nbsp;boolean&nbsp;isNull(java.lang.Object...&nbsp;values)</pre>
<div class="block">Checks values to make sure they're not null</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>values</code> - Values to check</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>If any are null</dd>
</dl>
</li>
</ul>
<a name="getBackwards-java.util.Map-java.lang.Object-">
<!-- -->
</a><a name="getBackwards-java.util.Map-V-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBackwards</h4>
<pre>public static&nbsp;&lt;K,V&gt;&nbsp;java.util.List&lt;K&gt;&nbsp;getBackwards(java.util.Map&lt;K,V&gt;&nbsp;map,
V&nbsp;value)</pre>
<div class="block">Get keys by value from map</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>K</code> - Key</dd>
<dd><code>V</code> - Value</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>map</code> - Map to search</dd>
<dd><code>value</code> - Value to search for</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Search results</dd>
</dl>
</li>
</ul>
<a name="readAll-java.io.Reader-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readAll</h4>
<pre>public static&nbsp;java.lang.String&nbsp;readAll(java.io.Reader&nbsp;rd)
throws java.io.IOException</pre>
<div class="block">Read Everything from Reader</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>rd</code> - Reader</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Reader Contents</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
</dl>
</li>
</ul>
<a name="copyFromJar-java.lang.ClassLoader-java.lang.String-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copyFromJar</h4>
<pre>public static&nbsp;void&nbsp;copyFromJar(java.lang.ClassLoader&nbsp;loader,
java.lang.String&nbsp;resource,
java.lang.String&nbsp;destination)</pre>
<div class="block">Copy from the Class Loader</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>loader</code> - ClassLoader</dd>
<dd><code>resource</code> - Location From</dd>
<dd><code>destination</code> - Location To</dd>
</dl>
</li>
</ul>
<a name="isException-net.ME1312.SubServers.Client.Bukkit.Library.Util.ExceptionRunnable-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isException</h4>
<pre>public static&nbsp;boolean&nbsp;isException(<a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Library/Util.ExceptionRunnable.html" title="interface in net.ME1312.SubServers.Client.Bukkit.Library">Util.ExceptionRunnable</a>&nbsp;runnable)</pre>
<div class="block">Determines if an Exception will occur</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>runnable</code> - Runnable</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>If an Exception occured</dd>
</dl>
</li>
</ul>
<a name="deleteDirectory-java.io.File-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>deleteDirectory</h4>
<pre>public static&nbsp;void&nbsp;deleteDirectory(java.io.File&nbsp;folder)</pre>
<div class="block">Delete a Directory</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>folder</code> - Location</dd>
</dl>
</li>
</ul>
<a name="copyDirectory-java.io.File-java.io.File-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copyDirectory</h4>
<pre>public static&nbsp;void&nbsp;copyDirectory(java.io.File&nbsp;from,
java.io.File&nbsp;to)</pre>
<div class="block">Copy a Directory</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>from</code> - Source</dd>
<dd><code>to</code> - Destination</dd>
</dl>
</li>
</ul>
<a name="random-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>random</h4>
<pre>public static&nbsp;int&nbsp;random(int&nbsp;min,
int&nbsp;max)</pre>
<div class="block">Get a Random Integer</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>min</code> - Minimum Value</dd>
<dd><code>max</code> - Maximum Value</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Random Integer</dd>
</dl>
</li>
</ul>
<a name="unescapeJavaString-java.lang.String-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>unescapeJavaString</h4>
<pre>public static&nbsp;java.lang.String&nbsp;unescapeJavaString(java.lang.String&nbsp;str)</pre>
<div class="block">Parse escapes in a Java String</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>str</code> - String</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Unescaped String</dd>
</dl>
</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="../../../../../../net/ME1312/SubServers/Client/Bukkit/Library/UniversalFile.html" title="class in net.ME1312.SubServers.Client.Bukkit.Library"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../../net/ME1312/SubServers/Client/Bukkit/Library/Util.ExceptionRunnable.html" title="interface in net.ME1312.SubServers.Client.Bukkit.Library"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?net/ME1312/SubServers/Client/Bukkit/Library/Util.html" target="_top">Frames</a></li>
<li><a href="Util.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><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&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>Constr&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>