Class Util

java.lang.Object
net.tnemc.item.providers.Util

public class Util extends Object
Util
Since:
1.0.0.0
Author:
creatorfromhell
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

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

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 compare
      list2 - 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

      public static <V> boolean listsEquals(List<V> list1, List<V> list2)
      Compares two lists for equality regardless of order.
      Parameters:
      list1 - the first list to be compared
      list2 - the second list to be compared
      Returns:
      true if the two lists contain the same elements, false otherwise
      Since:
      0.2.0.0
    • listsEquals

      public static <V> boolean listsEquals(List<V> list1, List<V> list2, boolean debug)
      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 compare
      list2 - the second list to compare
      debug - 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

      public static <V> boolean setsEquals(Set<V> list1, Set<V> list2)
      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 compared
      list2 - the second set to be compared
      Returns:
      true if the sets are equal, false otherwise
      Since:
      0.2.0.0