Package net.eternalclient.api.utilities
Class Muling
- java.lang.Object
-
- net.eternalclient.api.utilities.Muling
-
public class Muling extends java.lang.ObjectUtility class for performing operations on a list of mules.
-
-
Constructor Summary
Constructors Constructor Description Muling()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancontainsOwnedItem(java.util.List<Mule> mules, int id)Checks if any of the Mules in the given List have an owned item with the specified id.static booleancontainsOwnedItem(java.util.List<Mule> mules, java.lang.String name)Checks if any of the Mules in the given List have an owned item with the specified name.static booleancontainsRemainingItem(java.util.List<Mule> mules, int id)Checks if any of the Mules in the list have a remaining item with the given id.static booleancontainsRemainingItem(java.util.List<Mule> mules, java.lang.String name)Checks if any of the mules have a remaining item with the specified name.static intcountOwnedItems(java.util.List<Mule> mules, int... ids)Counts the total number of owned items with given ids in the list of Mules.static intcountOwnedItems(java.util.List<Mule> mules, java.lang.String... names)Counts the total quantity of owned items by the given list of Mules, filtered by the provided item names.static intcountRemainingItems(java.util.List<Mule> mules, int... ids)Counts the total quantity of remaining items with the specified ids across all Mules.static intcountRemainingItems(java.util.List<Mule> mules, java.lang.String... names)Returns the total quantity of remaining items owned by the given list of mules with names matching the provided strings.static java.util.List<Mule>getMules()Retrieves a list of Mules.
-
-
-
Method Detail
-
getMules
public static java.util.List<Mule> getMules() throws java.lang.Exception
Retrieves a list of Mules.- Returns:
- a list of Mules retrieved from the server
- Throws:
java.lang.Exception
-
containsOwnedItem
public static boolean containsOwnedItem(java.util.List<Mule> mules, int id)
Checks if any of the Mules in the given List have an owned item with the specified id.- Parameters:
mules- the List of Mules to search throughid- the id of the item to check for- Returns:
- true if any Mule owns an item with the specified id, false otherwise
-
containsRemainingItem
public static boolean containsRemainingItem(java.util.List<Mule> mules, int id)
Checks if any of the Mules in the list have a remaining item with the given id.- Parameters:
mules- the list of Mules to checkid- the id of the item to search for- Returns:
- true if a Mule contains a remaining item with the given id, false otherwise
-
containsOwnedItem
public static boolean containsOwnedItem(java.util.List<Mule> mules, java.lang.String name)
Checks if any of the Mules in the given List have an owned item with the specified name.- Parameters:
mules- the List of Mules to search inname- the name of the item to look for- Returns:
- true if any Mule has an owned item with the specified name, false otherwise
-
containsRemainingItem
public static boolean containsRemainingItem(java.util.List<Mule> mules, java.lang.String name)
Checks if any of the mules have a remaining item with the specified name.- Parameters:
mules- the list of mules to checkname- the name of the item to search for- Returns:
- true if a mule has a remaining item with the specified name, false otherwise
-
countOwnedItems
public static int countOwnedItems(java.util.List<Mule> mules, int... ids)
Counts the total number of owned items with given ids in the list of Mules.- Parameters:
mules- the list of Mules to search for owned itemsids- the variable number of item ids to search for- Returns:
- the total count of owned items with the given ids
-
countRemainingItems
public static int countRemainingItems(java.util.List<Mule> mules, int... ids)
Counts the total quantity of remaining items with the specified ids across all Mules.- Parameters:
mules- the list of Mulesids- the item ids to search for- Returns:
- the total quantity of remaining items with the specified ids
-
countOwnedItems
public static int countOwnedItems(java.util.List<Mule> mules, java.lang.String... names)
Counts the total quantity of owned items by the given list of Mules, filtered by the provided item names.- Parameters:
mules- the list of Mules to check for owned itemsnames- the item names to filter the owned items by- Returns:
- the total quantity of owned items with matching names
-
countRemainingItems
public static int countRemainingItems(java.util.List<Mule> mules, java.lang.String... names)
Returns the total quantity of remaining items owned by the given list of mules with names matching the provided strings.- Parameters:
mules- the list of mules to check for remaining itemsnames- the names to match against the item composites- Returns:
- the total quantity of remaining items with matching names
-
-