Package org.harctoolbox.irp
Class NameOrNumber
java.lang.Object
org.harctoolbox.irp.IrpObject
org.harctoolbox.irp.NameOrNumber
- All Implemented Interfaces:
Serializable
,Floatable
,XmlExport
- See Also:
-
Constructor Summary
ConstructorDescriptionNameOrNumber
(double x) NameOrNumber
(String str) NameOrNumber
(Floatable floatable) -
Method Summary
Modifier and TypeMethodDescriptionboolean
constant
(NameEngine nameEngine) boolean
int
hashCode()
substituteConstantVariables
(Map<String, Long> constantVariables) double
toFloat
(GeneralSpec generalSpec, NameEngine nameEngine) Produces a floating result.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
-
NameOrNumber
-
NameOrNumber
-
NameOrNumber
public NameOrNumber(double x) -
NameOrNumber
-
-
Method Details
-
substituteConstantVariables
-
toFloat
public double toFloat(GeneralSpec generalSpec, NameEngine nameEngine) throws NameUnassignedException, IrpInvalidArgumentException Description copied from interface:Floatable
Produces a floating result.- Specified by:
toFloat
in interfaceFloatable
- Returns:
- Floating representation of class.
- Throws:
NameUnassignedException
IrpInvalidArgumentException
-
toElement
-
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 interfaceFloatable
- Specified by:
toIrpString
in classIrpObject
- Parameters:
radix
- Radix for parameters.- Returns:
- Formatted string.
-
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() -
constant
-