Package rs.kreme.ksbot.api.queries
Class TradePostQuery
- java.lang.Object
-
- rs.kreme.ksbot.api.queries.Query<TradingPostItem,TradePostQuery>
-
- rs.kreme.ksbot.api.queries.TradePostQuery
-
public class TradePostQuery extends Query<TradingPostItem,TradePostQuery>
Filters and queries items in the trading post based on various criteria. Provides methods to filter items based on attributes like tradeability, price, quantity, and other conditions. This class extends the base Query class.
-
-
Constructor Summary
Constructors Constructor Description TradePostQuery(java.util.Collection<TradingPostItem> ts)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TradePostQuery
differenceInValueLessThan(int difference)
Filters items with a price difference less than the specified value.TradePostQuery
nonPlaceHolder()
Excludes placeholder items from the query.TradePostQuery
onlyStackable()
Filters only stackable items in the query.TradePostQuery
priceOver(int price)
Filters items with a high alchemy price greater than or equal to the specified price.TradePostQuery
quantityGreaterThan(int quantity)
Filters items with quantity greater than the specified value.TradePostQuery
tradeable()
Filters items that are tradeable.TradePostQuery
withIndex(int idx)
Filters items based on their index in the trading post.TradePostQuery
withPriceAbove(int price)
Filters items with a price greater than or equal to the specified value.TradePostQuery
withPriceBelow(int price)
Filters items with a price less than or equal to the specified value.TradePostQuery
withQuantityAbove(int quantity)
Filters items with quantity greater than the specified value.-
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
-
-
-
-
Constructor Detail
-
TradePostQuery
public TradePostQuery(java.util.Collection<TradingPostItem> ts)
-
-
Method Detail
-
tradeable
public TradePostQuery tradeable()
Filters items that are tradeable.- Returns:
- the current query instance with tradeable items.
-
differenceInValueLessThan
public TradePostQuery differenceInValueLessThan(int difference)
Filters items with a price difference less than the specified value.- Parameters:
difference
- the maximum allowed price difference.- Returns:
- the current query instance with filtered items.
-
priceOver
public TradePostQuery priceOver(int price)
Filters items with a high alchemy price greater than or equal to the specified price.- Parameters:
price
- the minimum high alchemy price.- Returns:
- the current query instance with filtered items.
-
withIndex
public TradePostQuery withIndex(int idx)
Filters items based on their index in the trading post.- Parameters:
idx
- the index to match.- Returns:
- the current query instance with filtered items.
-
nonPlaceHolder
public TradePostQuery nonPlaceHolder()
Excludes placeholder items from the query.- Returns:
- the current query instance with non-placeholder items.
-
quantityGreaterThan
public TradePostQuery quantityGreaterThan(int quantity)
Filters items with quantity greater than the specified value.- Parameters:
quantity
- the minimum quantity.- Returns:
- the current query instance with filtered items.
-
onlyStackable
public TradePostQuery onlyStackable()
Filters only stackable items in the query.- Returns:
- the current query instance with only stackable items.
-
withPriceBelow
public TradePostQuery withPriceBelow(int price)
Filters items with a price less than or equal to the specified value.- Parameters:
price
- the maximum price.- Returns:
- the current query instance with filtered items.
-
withPriceAbove
public TradePostQuery withPriceAbove(int price)
Filters items with a price greater than or equal to the specified value.- Parameters:
price
- the minimum price.- Returns:
- the current query instance with filtered items.
-
withQuantityAbove
public TradePostQuery withQuantityAbove(int quantity)
Filters items with quantity greater than the specified value.- Parameters:
quantity
- the minimum quantity.- Returns:
- the current query instance with filtered items.
-
-