Class MixedIngredientsAdapter

java.lang.Object
org.cyclops.commoncapabilities.api.ingredient.MixedIngredientsAdapter
All Implemented Interfaces:
Comparable<IMixedIngredients>, IMixedIngredients
Direct Known Subclasses:
MixedIngredients

public abstract class MixedIngredientsAdapter extends Object implements IMixedIngredients
Abstract implementation of mixed ingredients.
  • Constructor Details

    • MixedIngredientsAdapter

      public MixedIngredientsAdapter()
  • Method Details

    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • compareTo

      public int compareTo(IMixedIngredients that)
      Specified by:
      compareTo in interface Comparable<IMixedIngredients>
    • compareCollection

      public static <T extends Comparable<T>> int compareCollection(Collection<? super T> a, Collection<? super T> b)
      Compare two collections with comparable elements.
      Type Parameters:
      T - The type of the elements.
      Parameters:
      a - A first collection.
      b - A second collection.
      Returns:
      The comparator value.
    • compareCollection

      public static <T> int compareCollection(Collection<? super T> a, Collection<? super T> b, Comparator<T> comparator)
      Compare two collections with a custom comparator.
      Type Parameters:
      T - The type of the elements.
      Parameters:
      a - A first collection.
      b - A second collection.
      comparator - The element comparator.
      Returns:
      The comparator value.