Package games.stendhal.common.grammar
Class ItemParserResult
java.lang.Object
games.stendhal.common.grammar.ItemParserResult
- Direct Known Subclasses:
MerchantBehaviourResult
Result of parsing an item name and amount by ItemParser.
-
Field Summary
Modifier and TypeFieldDescriptionprotected int
The amount of requested items.protected String
The item name of the thing requested.The partly matching item names. -
Constructor Summary
ConstructorDescriptionItemParserResult(boolean found, String chosenItemName, int amount, Set<String> mayBeItems)
-
Method Summary
Modifier and TypeMethodDescriptionint
void
setAmount(int amount)
Sets the amount that the player wants to transact with the NPC.void
setChosenItemName(String chosenItemName)
boolean
wasFound()
-
Field Details
-
chosenItemName
The item name of the thing requested. -
mayBeItems
The partly matching item names. -
amount
protected int amountThe amount of requested items.
-
-
Constructor Details
-
ItemParserResult
-
-
Method Details
-
wasFound
public boolean wasFound()- Returns:
- found flag
-
getChosenItemName
- Returns:
- the chosenItemName
-
setChosenItemName
- Parameters:
chosenItemName
- the chosenItemName to set
-
getMayBeItems
- Returns:
- the partly matching item names
-
getAmount
public int getAmount() -
setAmount
public void setAmount(int amount)Sets the amount that the player wants to transact with the NPC.- Parameters:
amount
- amount
-