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 final int`
  `DEFAULT_PORT`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Util()`

- ## Method Summary

  Modifier and Type
  Method
  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.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### DEFAULT_PORT

    public static final int DEFAULT_PORT
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### Util

    public Util()

- ## Method Details

  - ### 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 a `Throwable`. Useful for debugging.
    Parameters:
      `t` - the `Throwable` to format.
    Returns:
      a string representing information about the `Throwable`

  - ### exception

    public static String exception(Throwable t, boolean includeLineNumbers)
    Constructs a pretty one line version of a `Throwable`. Useful for debugging.
    Parameters:
      `t` - the `Throwable` to format.
      `includeLineNumbers` - whether to include line numbers
    Returns:
      a string representing information about the `Throwable`

  - ### csv

    public static String csv(Iterable<?> objects)

  - ### format

    @Deprecated public static String format(Iterable<?> objects, String separators)
    Deprecated.
    use `String` join methods
    Returns a string of objects, each separated by a separator.
    Parameters:
      `objects` - the objects to join
      `separators` - the separator
    Returns:
      joined string
    See Also:
      - `String.join(java.lang.CharSequence, java.lang.Iterable)`

  - ### getUUID

    public static UUID getUUID(String uuid)
    Converts a String to a UUID
    Parameters:
      `uuid` - The string to be converted
    Returns:
      The result