mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-23 12:06:15 +01:00
More jdoc stuff
This commit is contained in:
parent
1fedb1e347
commit
61a225937d
@ -43,6 +43,7 @@
|
||||
<configuration>
|
||||
<show>public</show>
|
||||
<useStandardDocletOptions>false</useStandardDocletOptions>
|
||||
<additionalparam>-Xdoclint:none</additionalparam>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
|
@ -28,6 +28,8 @@ public class ListTagBuilder {
|
||||
/**
|
||||
* Create a new builder instance.
|
||||
*
|
||||
* @param type
|
||||
*
|
||||
* @return a new builder
|
||||
*/
|
||||
public static ListTagBuilder create(final Class<? extends Tag> type) {
|
||||
@ -37,6 +39,9 @@ public class ListTagBuilder {
|
||||
/**
|
||||
* Create a new builder instance.
|
||||
*
|
||||
* @param entries
|
||||
* @param <T>
|
||||
*
|
||||
* @return a new builder
|
||||
*/
|
||||
@SafeVarargs
|
||||
|
@ -11,8 +11,8 @@ import java.util.Map;
|
||||
|
||||
/**
|
||||
* This class reads <strong>NBT</strong>, or <strong>Named Binary Tag</strong> streams, and produces an object graph of
|
||||
* subclasses of the {@code Tag} object. <p> The NBT format was created by Markus Persson, and the specification
|
||||
* may be found at <a href="http://www.minecraft.net/docs/NBT.txt"> http://www.minecraft.net/docs/NBT.txt</a>. </p>
|
||||
* subclasses of the {@code Tag} object. The NBT format was created by Markus Persson, and the specification
|
||||
* may be found at @linktourl http://www.minecraft.net/docs/NBT.txt"> http://www.minecraft.net/docs/NBT.txt.
|
||||
*/
|
||||
public final class NBTInputStream implements Closeable {
|
||||
private final DataInputStream is;
|
||||
|
@ -29,7 +29,8 @@ import java.util.List;
|
||||
/**
|
||||
* <p> This class writes <strong>NBT</strong>, or <strong>Named Binary Tag</strong> <code>Tag</code> objects to an
|
||||
* underlying <code>OutputStream</code>. </p> <p> The NBT format was created by Markus Persson, and the
|
||||
* specification may be found at <a href="http://www.minecraft.net/docs/NBT.txt"> http://www.minecraft.net/docs/NBT.txt</a>.
|
||||
* specification may be found at
|
||||
* @linktourl http://www.minecraft.net/docs/NBT.txt
|
||||
* </p>
|
||||
*
|
||||
* @author Graham Edgecombe
|
||||
|
@ -134,6 +134,7 @@ public final class NBTUtils {
|
||||
* @param items the map to read from
|
||||
* @param key the key to look for
|
||||
* @param expected the expected NBT class type
|
||||
* @param <T>
|
||||
*
|
||||
* @return child tag
|
||||
*/
|
||||
|
@ -34,59 +34,6 @@ public class HTTP {
|
||||
*/
|
||||
public static final String CRLF = "\r\n";
|
||||
|
||||
/**
|
||||
* Convert an HTTP header string into a JSONObject. It can be a request header or a response header. A request
|
||||
* header will contain
|
||||
*
|
||||
*
|
||||
* <pre>
|
||||
* {
|
||||
* Method: "POST" (for example),
|
||||
* "Request-URI": "/" (for example),
|
||||
* "HTTP-Version": "HTTP/1.1" (for example)
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* A response header will contain
|
||||
*
|
||||
*
|
||||
* <pre>
|
||||
* {
|
||||
* "HTTP-Version": "HTTP/1.1" (for example),
|
||||
* "Status-Code": "200" (for example),
|
||||
* "Reason-Phrase": "OK" (for example)
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* In addition, the other parameters in the header will be captured, using the HTTP field names as JSON names, so
|
||||
* that
|
||||
*
|
||||
*
|
||||
* <pre>
|
||||
* Date: Sun, 26 May 2002 18:06:04 GMT
|
||||
* Cookie: Q=q2=PPEAsg--; B=677gi6ouf29bn&b=2&f=s
|
||||
* Cache-Control: no-cache
|
||||
* </pre>
|
||||
*
|
||||
* become
|
||||
*
|
||||
*
|
||||
* <pre>
|
||||
* {...
|
||||
* Date: "Sun, 26 May 2002 18:06:04 GMT",
|
||||
* Cookie: "Q=q2=PPEAsg--; B=677gi6ouf29bn&b=2&f=s",
|
||||
* "Cache-Control": "no-cache",
|
||||
* ...}
|
||||
* </pre>
|
||||
*
|
||||
* It does no further checking or conversion. It does not parse dates. It does not do '%' transforms on URLs.
|
||||
*
|
||||
* @param string An HTTP header string.
|
||||
*
|
||||
* @return A JSONObject containing the elements and attributes of the XML string.
|
||||
*
|
||||
* @throws JSONException
|
||||
*/
|
||||
public static JSONObject toJSONObject(final String string) throws JSONException {
|
||||
final JSONObject jo = new JSONObject();
|
||||
final HTTPTokener x = new HTTPTokener(string);
|
||||
|
@ -188,7 +188,6 @@ public class JSONML {
|
||||
* Convert a well-formed (but not necessarily valid) XML string into a JSONArray using the JsonML transform. Each
|
||||
* XML tag is represented as a JSONArray in which the first element is the tag name. If the tag has attributes, then
|
||||
* the second element will be JSONObject containing the name/value pairs. If the tag contains children, then strings
|
||||
* and JSONArrays will represent the child tags. Comments, prologs, DTDs, and <code><[ [ ]]></code> are ignored.
|
||||
*
|
||||
* @param string The source string.
|
||||
*
|
||||
|
@ -343,7 +343,6 @@ public class JSONObject {
|
||||
|
||||
/**
|
||||
* Produce a string in double quotes with backslash sequences in all the right places. A backslash will be inserted
|
||||
* within </, producing <\/, allowing JSON text to be delivered in HTML. In JSON text, a string cannot contain a
|
||||
* control character or an unescaped quote or backslash.
|
||||
*
|
||||
* @param string A String
|
||||
|
@ -9,58 +9,16 @@ import java.util.Iterator;
|
||||
* @version 2014-05-03
|
||||
*/
|
||||
public class XML {
|
||||
/**
|
||||
* The Character '&'.
|
||||
*/
|
||||
public static final Character AMP = '&';
|
||||
/**
|
||||
* The Character '''.
|
||||
*/
|
||||
public static final Character APOS = '\'';
|
||||
/**
|
||||
* The Character '!'.
|
||||
*/
|
||||
public static final Character BANG = '!';
|
||||
/**
|
||||
* The Character '='.
|
||||
*/
|
||||
public static final Character EQ = '=';
|
||||
/**
|
||||
* The Character '>'.
|
||||
*/
|
||||
public static final Character GT = '>';
|
||||
/**
|
||||
* The Character '<'.
|
||||
*/
|
||||
public static final Character LT = '<';
|
||||
/**
|
||||
* The Character '?'.
|
||||
*/
|
||||
public static final Character QUEST = '?';
|
||||
/**
|
||||
* The Character '"'.
|
||||
*/
|
||||
public static final Character QUOT = '"';
|
||||
/**
|
||||
* The Character '/'.
|
||||
*/
|
||||
public static final Character SLASH = '/';
|
||||
|
||||
/**
|
||||
* Replace special characters with XML escapes:
|
||||
*
|
||||
*
|
||||
* <pre>
|
||||
* & <small>(ampersand)</small> is replaced by &amp;
|
||||
* < <small>(less than)</small> is replaced by &lt;
|
||||
* > <small>(greater than)</small> is replaced by &gt;
|
||||
* " <small>(double quote)</small> is replaced by &quot;
|
||||
* </pre>
|
||||
*
|
||||
* @param string The string to be escaped.
|
||||
*
|
||||
* @return The escaped string.
|
||||
*/
|
||||
public static String escape(final String string) {
|
||||
final StringBuilder sb = new StringBuilder(string.length());
|
||||
for (int i = 0, length = string.length(); i < length; i++) {
|
||||
@ -300,20 +258,6 @@ public class XML {
|
||||
return string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a well-formed (but not necessarily valid) XML string into a JSONObject. Some information may be lost in
|
||||
* this transformation because JSON is a data format and XML is a document format. XML uses elements, attributes,
|
||||
* and content text, while JSON uses unordered collections of name/value pairs and arrays of values. JSON does not
|
||||
* does not like to distinguish between elements and attributes. Sequences of similar elements are represented as
|
||||
* JSONArrays. Content text may be placed in a "content" member. Comments, prologs, DTDs, and <code><[ [
|
||||
* ]]></code> are ignored.
|
||||
*
|
||||
* @param string The source string.
|
||||
*
|
||||
* @return A JSONObject containing the structured data from the XML string.
|
||||
*
|
||||
* @throws JSONException
|
||||
*/
|
||||
public static JSONObject toJSONObject(final String string) throws JSONException {
|
||||
final JSONObject jo = new JSONObject();
|
||||
final XMLTokener x = new XMLTokener(string);
|
||||
|
@ -55,10 +55,10 @@ public class XMLTokener extends JSONTokener {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the next XML outer token, trimming whitespace. There are two kinds of tokens: the '<' character which begins
|
||||
* Get the next XML outer token, trimming whitespace. There are two kinds of tokens: the '<' character which begins
|
||||
* a markup tag, and the content text between markup tags.
|
||||
*
|
||||
* @return A string, or a '<' Character, or null if there is no more source text.
|
||||
* @return A string, or a '<' Character, or null if there is no more source text.
|
||||
*
|
||||
* @throws JSONException
|
||||
*/
|
||||
@ -90,7 +90,7 @@ public class XMLTokener extends JSONTokener {
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the next entity. These entities are translated to Characters: <code>& ' > <
|
||||
* Return the next entity. These entities are translated to Characters: <code>& " > <
|
||||
* "</code>.
|
||||
*
|
||||
* @param ampersand An ampersand character.
|
||||
@ -119,7 +119,7 @@ public class XMLTokener extends JSONTokener {
|
||||
/**
|
||||
* Returns the next XML meta token. This is used for skipping over <!...> and <?...?> structures.
|
||||
*
|
||||
* @return Syntax characters (<code>< > / = ! ?</code>) are returned as Character, and strings and names are
|
||||
* @return Syntax characters (<code>< > / = ! ?</code>) are returned as Character, and strings and names are
|
||||
* returned as Boolean. We don't care what the values actually are.
|
||||
*
|
||||
* @throws JSONException If a string is not properly closed or if the XML is badly structured.
|
||||
@ -182,7 +182,7 @@ public class XMLTokener extends JSONTokener {
|
||||
|
||||
/**
|
||||
* Get the next XML Token. These tokens are found inside of angle brackets. It may be one of these characters:
|
||||
* <code>/ > = ! ?</code> or it may be a string wrapped in single quotes or double quotes, or it may be a name.
|
||||
* <code>/ >= ! ?</code> or it may be a string wrapped in single quotes or double quotes, or it may be a name.
|
||||
*
|
||||
* @return a String or a Character.
|
||||
*
|
||||
|
@ -201,7 +201,7 @@ import com.intellectualcrafters.plot.uuid.UUIDWrapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* Do not use this. Instead use FlagManager.<method> in your code.
|
||||
* Do not use this. Instead use FlagManager.[method] in your code.
|
||||
* - Flag related stuff
|
||||
*
|
||||
* @return FlagManager
|
||||
@ -214,7 +214,7 @@ import com.intellectualcrafters.plot.uuid.UUIDWrapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* Do not use this. Instead use ClusterManager.<method> in your code.
|
||||
* Do not use this. Instead use ClusterManager.[method] in your code.
|
||||
* - Plot cluster related stuff
|
||||
*
|
||||
* @return ClusterManager
|
||||
@ -227,7 +227,7 @@ import com.intellectualcrafters.plot.uuid.UUIDWrapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* Do not use this. Instead use MainUtil.<method> in your code.
|
||||
* Do not use this. Instead use MainUtil.[method] in your code.
|
||||
* - Basic plot management stuff
|
||||
*
|
||||
* @return MainUtil
|
||||
@ -240,7 +240,7 @@ import com.intellectualcrafters.plot.uuid.UUIDWrapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* Do not use this. Instead use Permissions.<method> in your code.
|
||||
* Do not use this. Instead use Permissions.[method] in your code.
|
||||
* - Basic permission management stuff
|
||||
*
|
||||
* @return MainUtil
|
||||
@ -264,7 +264,7 @@ import com.intellectualcrafters.plot.uuid.UUIDWrapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use C.<caption> instead
|
||||
* Use C.[caption] instead
|
||||
*
|
||||
* @return C
|
||||
*
|
||||
@ -293,7 +293,7 @@ import com.intellectualcrafters.plot.uuid.UUIDWrapper;
|
||||
* Get the plot manager for a world. - Contains useful low level methods for plot merging, clearing, and
|
||||
* tessellation
|
||||
*
|
||||
* @param world Plot World
|
||||
* @param world
|
||||
*
|
||||
* @return PlotManager
|
||||
*
|
||||
|
@ -38,7 +38,7 @@ public class AbstractFlag {
|
||||
|
||||
/**
|
||||
* AbstractFlag is a parameter used in creating a new Flag<br>
|
||||
* The key must be alphabetical characters and <= 16 characters in length
|
||||
* The key must be alphabetical characters and <= 16 characters in length
|
||||
* @param key
|
||||
*/
|
||||
public AbstractFlag(final String key, final FlagValue<?> value) {
|
||||
|
@ -31,7 +31,7 @@ public class Flag {
|
||||
* player, you need to register it with PlotSquared.
|
||||
*
|
||||
* @param key AbstractFlag
|
||||
* @param value Value must be alphanumerical (can have spaces) and be <= 48 characters
|
||||
* @param value Value must be alphanumerical (can have spaces) and be <= 48 characters
|
||||
*
|
||||
* @throws IllegalArgumentException if you provide inadequate inputs
|
||||
*/
|
||||
|
@ -171,7 +171,7 @@ public class FlagManager {
|
||||
/**
|
||||
*
|
||||
* @param plot
|
||||
* @return Set<Flag>
|
||||
* @return set of flags
|
||||
*/
|
||||
public static Set<Flag> getPlotFlags(final Plot plot) {
|
||||
return getSettingFlags(plot.world, plot.settings);
|
||||
|
@ -283,8 +283,8 @@ public class Plot implements Cloneable {
|
||||
/**
|
||||
* Get the plot hashcode
|
||||
*
|
||||
* @return integer. You can easily make this a character array <br> xI = c[0] x = c[1 -> xI...] yI = c[xI ... + 1] y
|
||||
* = c[xI ... + 2 -> yI ...]
|
||||
* @return integer. You can easily make this a character array <br> xI = c[0] x = c[1 -> xI...] yI = c[xI ... + 1] y
|
||||
* = c[xI ... + 2 -> yI ...]
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
|
Loading…
Reference in New Issue
Block a user