Package org.harctoolbox.irp
Class ParameterSpec
java.lang.Object
org.harctoolbox.irp.IrpObject
org.harctoolbox.irp.ParameterSpec
- All Implemented Interfaces:
Serializable
,XmlExport
- See Also:
-
Constructor Summary
ConstructorDescriptionParameterSpec
(String str) ParameterSpec
(String name, boolean memory, int length) ParameterSpec
(String name, boolean memory, long min, long max) ParameterSpec
(String name, boolean memory, long min, long max, Expression deflt) ParameterSpec
(IrpParser.NameContext name, boolean hasMemory, IrpParser.NumberContext min, IrpParser.NumberContext max, IrpParser.ExpressionContext deflt) -
Method Summary
Modifier and TypeMethodDescriptionvoid
check
(NameEngine nameEngine) void
checkDomain
(long value) boolean
long
getMax()
long
getMin()
getName()
boolean
int
hashCode()
boolean
static void
initRandom
(long seed) static boolean
isStandardName
(String name) boolean
isWithinDomain
(long x) long
random()
long
toIrpString
(int radix) Returns a computed IRP (-segment) string representation of current IrpObject.int
weight()
Returns a (somewhat arbitrary) measure of the complexity of the object.Methods inherited from class org.harctoolbox.irp.IrpObject
createParameterSpecs, getParseTree, numberOfBits, numberOfBitSpecs, numberOfInfiniteRepeats, prerender, propertiesMap, toDocument, toIrpString, toString, toString, toStringTree, toStringTree, toTreeViewer, toTreeViewer, toTreeViewer, updateStateWhenEntering, updateStateWhenExiting
-
Constructor Details
-
ParameterSpec
-
ParameterSpec
-
ParameterSpec
public ParameterSpec(IrpParser.NameContext name, boolean hasMemory, IrpParser.NumberContext min, IrpParser.NumberContext max, IrpParser.ExpressionContext deflt) -
ParameterSpec
public ParameterSpec(String name, boolean memory, long min, long max, Expression deflt) throws InvalidNameException - Throws:
InvalidNameException
-
ParameterSpec
- Throws:
InvalidNameException
-
ParameterSpec
- Throws:
InvalidNameException
-
-
Method Details
-
isStandardName
-
initRandom
public static void initRandom(long seed) -
toIrpString
Description copied from class:IrpObject
Returns a computed IRP (-segment) string representation of current IrpObject. Numerical parameters, but not durations etc, will be printed using the radix in the argument.- Specified by:
toIrpString
in classIrpObject
- Parameters:
radix
- Radix for parameters.- Returns:
- Formatted string.
-
check
public void check(NameEngine nameEngine) throws InvalidNameException, DomainViolationException, NameUnassignedException -
checkDomain
- Throws:
DomainViolationException
-
isWithinDomain
public boolean isWithinDomain(long x) -
toElement
-
domainAsString
-
getName
-
getDefault
-
hasDefault
public boolean hasDefault() -
getMin
public long getMin() -
getMax
public long getMax() -
hasMemory
public boolean hasMemory() -
random
public long random() -
random
-
weight
public int weight()Description copied from class:IrpObject
Returns a (somewhat arbitrary) measure of the complexity of the object. Can be used for determining if a decode is "simpler" than another decode. -
equals
-
hashCode
public int hashCode()
-