Package net.md_5.bungee
Class Util
- java.lang.Object
-
- net.md_5.bungee.Util
-
public class Util extends Object
Series of utility classes to perform various operations.
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_PORT
-
Constructor Summary
Constructors Constructor Description Util()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
csv(Iterable<?> objects)
static String
exception(Throwable t)
Constructs a pretty one line version of aThrowable
.static String
format(Iterable<?> objects, String separators)
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 UUIDstatic String
hex(int i)
Formats an integer as a hex value.static String
unicode(char c)
Formats an char as a unicode value.
-
-
-
Field Detail
-
DEFAULT_PORT
public static final int DEFAULT_PORT
- See Also:
- Constant Field Values
-
-
Method Detail
-
getAddr
public static SocketAddress getAddr(String hostline)
Method to transform human readable addresses into usable address objects.- Parameters:
hostline
- in the format of 'host:port'- Returns:
- the constructed hostname + port.
-
hex
public static String hex(int i)
Formats an integer as a hex value.- Parameters:
i
- the integer to format- Returns:
- the hex representation of the integer
-
unicode
public static String unicode(char c)
Formats an char as a unicode value.- Parameters:
c
- the character to format- Returns:
- the unicode representation of the character
-
exception
public static String exception(Throwable t)
Constructs a pretty one line version of aThrowable
. Useful for debugging.
-
-