public class Util extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_PORT |
| Constructor and Description |
|---|
Util() |
| Modifier and Type | Method and Description |
|---|---|
static String |
csv(Iterable<?> objects) |
static String |
exception(Throwable t)
Constructs a pretty one line version of a
Throwable. |
static String |
exception(Throwable t,
boolean includeLineNumbers)
Constructs a pretty one line version of a
Throwable. |
static String |
format(Iterable<?> objects,
String separators)
Deprecated.
use
String join methods |
static SocketAddress |
getAddr(String hostline)
Method to transform human readable addresses into usable address objects.
|
static UUID |
getUUID(String uuid)
Converts a String to a UUID
|
static String |
hex(int i)
Formats an integer as a hex value.
|
static String |
unicode(char c)
Formats an char as a unicode value.
|
public static final int DEFAULT_PORT
public static SocketAddress getAddr(String hostline)
hostline - in the format of 'host:port'public static String hex(int i)
i - the integer to formatpublic static String unicode(char c)
c - the character to formatpublic static String exception(Throwable t)
Throwable. Useful for
debugging.public static String exception(Throwable t, boolean includeLineNumbers)
Throwable. Useful for
debugging.@Deprecated public static String format(Iterable<?> objects, String separators)
String join methodsobjects - the objects to joinseparators - the separatorString.join(java.lang.CharSequence, java.lang.Iterable)Copyright © 2012–2023 SpigotMC. All rights reserved.