Class FactorySingleIntegerParameterInstructionParser
java.lang.Object
dev.zemco.codegame.compilation.parsing.AbstractNamedParametrizedInstructionParser
dev.zemco.codegame.compilation.parsing.FactorySingleParameterInstructionParser
dev.zemco.codegame.compilation.parsing.FactorySingleIntegerParameterInstructionParser
- All Implemented Interfaces:
IInstructionParser
- Direct Known Subclasses:
FactorySingleAddressParameterInstructionParser
public class FactorySingleIntegerParameterInstructionParser
extends FactorySingleParameterInstructionParser
Parses a named
instruction with a single integer parameter by requesting it
from a backing factory.
The backing factory cannot be modified after construction.
This class is implemented by wrapping the given backing factory with a string based one.
- Author:
- Erik Zemčík
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceProducesinstructionsfrom a singleintegerparameter.Nested classes/interfaces inherited from class dev.zemco.codegame.compilation.parsing.FactorySingleParameterInstructionParser
FactorySingleParameterInstructionParser.IStringInstructionFactory -
Constructor Summary
ConstructorsConstructorDescriptionFactorySingleIntegerParameterInstructionParser(String instructionName, FactorySingleIntegerParameterInstructionParser.IIntegerInstructionFactory instructionFactory) Creates an instance ofFactorySingleIntegerParameterInstructionParserthat parsesinstructionswith the given name by requesting them from the given backingfactory. -
Method Summary
Methods inherited from class dev.zemco.codegame.compilation.parsing.FactorySingleParameterInstructionParser
parseInstructionFromParametersMethods inherited from class dev.zemco.codegame.compilation.parsing.AbstractNamedParametrizedInstructionParser
checkParameterFixedCount, parseInstruction
-
Constructor Details
-
FactorySingleIntegerParameterInstructionParser
public FactorySingleIntegerParameterInstructionParser(String instructionName, FactorySingleIntegerParameterInstructionParser.IIntegerInstructionFactory instructionFactory) Creates an instance ofFactorySingleIntegerParameterInstructionParserthat parsesinstructionswith the given name by requesting them from the given backingfactory.- Parameters:
instructionName- name of the rawinstructioninstructionFactory- source of parsedinstructions- Throws:
IllegalArgumentException- ifinstructionNameisnullor empty or ifinstructionFactoryisnull
-