Package xyz.dynxsty.dih4jda.util
Class ArrayUtil
java.lang.Object
xyz.dynxsty.dih4jda.util.ArrayUtil
Utility class that contains some useful methods regarding arrays.
- Since:
- v1.6
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanChecks if the specified object is inside the specifed array.static byte[]sortArrayFromDataObject(net.dv8tion.jda.api.utils.data.DataObject dataObject) Gets the json-byte array and sorts it viaArrays.sort(byte[]).
-
Method Details
-
contains
Checks if the specified object is inside the specifed array.- Parameters:
array- The array to check.search- TheObjectto search for.- Returns:
- Whether the object is contained inside the array.
- Since:
- v1.6
-
sortArrayFromDataObject
public static byte[] sortArrayFromDataObject(@Nonnull net.dv8tion.jda.api.utils.data.DataObject dataObject) Gets the json-byte array and sorts it viaArrays.sort(byte[]).- Parameters:
dataObject- TheDataObjectto get the json-byte array from.- Returns:
- A sorted byte array.
- Since:
- v1.6.1
-