Package rs.kreme.ksbot.api.queries
Class ItemQuery
- java.lang.Object
-
- rs.kreme.ksbot.api.queries.Query<KSItem,ItemQuery>
-
- rs.kreme.ksbot.api.queries.ItemQuery
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ItemQuery
differenceInValueLessThan(int difference)
Filters items based on the difference in price (between the high alchemy price and the current price).ItemQuery
filterContains(java.lang.String... substrings)
Filters items by their name, including only those whose names contain any of the specified substrings.ItemQuery
nonPlaceHolder()
Filters out placeholder items by checking their quantity.ItemQuery
omitContains(java.lang.String substring)
Filters out items whose names contain a specific substring.ItemQuery
onlyNoted()
Filters items to include only those that are noted.ItemQuery
onlyStackable()
Filters items to include only stackable items.ItemQuery
onlyUnnoted()
Filters items to include only those that are unnoted.ItemQuery
priceOver(int price)
Filters items by high alchemy price, including only those with a price greater than or equal to the specified value.ItemQuery
quantityGreaterThan(int quantity)
Filters items based on their quantity.ItemQuery
tradeable()
Filters the items to include only those that are tradeable.ItemQuery
withSlot(int idx)
Filters items by their inventory slot index.-
Methods inherited from class rs.kreme.ksbot.api.queries.Query
count, empty, exists, filter, first, first, last, list, list, max, min, omit, omit, omit, random, shuffledList, shuffledList, sorted, stream, unique, withId, withName, withNameOrId, withOption, withoutId, withoutName, withoutNameOrId, withoutOption
-
-
-
-
Method Detail
-
tradeable
public ItemQuery tradeable()
Filters the items to include only those that are tradeable.- Returns:
- the current query instance containing only tradeable items.
-
differenceInValueLessThan
public ItemQuery differenceInValueLessThan(int difference)
Filters items based on the difference in price (between the high alchemy price and the current price). Includes only items where the absolute price difference is less than the specified amount.- Parameters:
difference
- the maximum allowed price difference.- Returns:
- the current query instance with filtered items.
-
priceOver
public ItemQuery priceOver(int price)
Filters items by high alchemy price, including only those with a price greater than or equal to the specified value.- Parameters:
price
- the minimum high alchemy price.- Returns:
- the current query instance with filtered items.
-
withSlot
public ItemQuery withSlot(int idx)
Filters items by their inventory slot index. Only includes items located in the specified slot.- Parameters:
idx
- the inventory slot index to match.- Returns:
- the current query instance with filtered items.
-
nonPlaceHolder
public ItemQuery nonPlaceHolder()
Filters out placeholder items by checking their quantity. Includes items with quantity greater than 0.- Returns:
- the current query instance with non-placeholder items.
-
quantityGreaterThan
public ItemQuery quantityGreaterThan(int quantity)
Filters items based on their quantity. Only includes items with a quantity greater than the specified value.- Parameters:
quantity
- the minimum quantity.- Returns:
- the current query instance with filtered items.
-
onlyStackable
public ItemQuery onlyStackable()
Filters items to include only stackable items.- Returns:
- the current query instance with stackable items.
-
onlyNoted
public ItemQuery onlyNoted()
Filters items to include only those that are noted.- Returns:
- the current query instance with noted items.
-
onlyUnnoted
public ItemQuery onlyUnnoted()
Filters items to include only those that are unnoted.- Returns:
- the current query instance with unnoted items.
-
filterContains
public ItemQuery filterContains(java.lang.String... substrings)
Filters items by their name, including only those whose names contain any of the specified substrings.- Parameters:
substrings
- the array of substrings to match within item names.- Returns:
- the current query instance with filtered items.
-
omitContains
public ItemQuery omitContains(java.lang.String substring)
Filters out items whose names contain a specific substring.- Parameters:
substring
- the substring to exclude from item names.- Returns:
- the current query instance with filtered items.
-
-