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
ConstructorsConstructorDescriptionNameOrNumber(double x) NameOrNumber(String str) NameOrNumber(Floatable floatable) -
Method Summary
Modifier and TypeMethodDescriptionbooleanconstant(NameEngine nameEngine) booleaninthashCode()substituteConstantVariables(Map<String, Long> constantVariables) doubletoFloat(GeneralSpec generalSpec, NameEngine nameEngine) Produces a floating result.toIrpString(int radix) Returns a computed IRP (-segment) string representation of current IrpObject.intweight()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:FloatableProduces a floating result.- Specified by:
toFloatin interfaceFloatable- Parameters:
generalSpec-nameEngine-- Returns:
- Floating representation of class.
- Throws:
NameUnassignedExceptionIrpInvalidArgumentException
-
toElement
-
toIrpString
Description copied from class:IrpObjectReturns 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:
toIrpStringin interfaceFloatable- Specified by:
toIrpStringin classIrpObject- Parameters:
radix- Radix for parameters.- Returns:
- Formatted string.
-
weight
public int weight()Description copied from class:IrpObjectReturns 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
-