Package net.tnemc.item.providers
Class Util
java.lang.Object
net.tnemc.item.providers.Util
Util
- Since:
- 1.0.0.0
- Author:
- creatorfromhell
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <V> boolean
listsEquals
(List<V> list1, List<V> list2) Compares two lists for equality regardless of order.static <V> boolean
listsEquals
(List<V> list1, List<V> list2, boolean debug) Compares two lists to check if they contain the same elements.static <V> boolean
setsEquals
(Set<V> list1, Set<V> list2) Compares two sets to see if they are equal.static boolean
textComponentsEqual
(List<net.kyori.adventure.text.Component> list1, List<net.kyori.adventure.text.Component> list2) Compares the text content of two lists of Components to determine if they are equal.
-
Constructor Details
-
Util
public Util()
-
-
Method Details
-
textComponentsEqual
public static boolean textComponentsEqual(List<net.kyori.adventure.text.Component> list1, List<net.kyori.adventure.text.Component> list2) Compares the text content of two lists of Components to determine if they are equal.- Parameters:
list1
- the first list of Components to comparelist2
- the second list of Components to compare- Returns:
- true if the text content of the two lists is equal, false otherwise
- Since:
- 0.2.0.0
-
listsEquals
Compares two lists for equality regardless of order.- Parameters:
list1
- the first list to be comparedlist2
- the second list to be compared- Returns:
- true if the two lists contain the same elements, false otherwise
- Since:
- 0.2.0.0
-
listsEquals
Compares two lists to check if they contain the same elements.- Type Parameters:
V
- the type of elements in the lists- Parameters:
list1
- the first list to comparelist2
- the second list to comparedebug
- true if debug information should be printed, false otherwise- Returns:
- true if the lists contain the same elements, false otherwise
- Since:
- 0.2.0.0
-
setsEquals
Compares two sets to see if they are equal. The sets are considered equal if each set contains all elements of the other set.- Parameters:
list1
- the first set to be comparedlist2
- the second set to be compared- Returns:
- true if the sets are equal, false otherwise
- Since:
- 0.2.0.0
-