Class FloatNumber

java.lang.Object
org.harctoolbox.irp.IrpObject
org.harctoolbox.irp.FloatNumber
All Implemented Interfaces:
Serializable, Floatable, XmlExport

public final class FloatNumber extends IrpObject implements Floatable
See Also:
  • Constructor Details

  • Method Details

    • parse

      public static double parse(String str)
    • parse

      public static double parse(IrpParser.Float_numberContext ctx)
    • toFloat

      public double toFloat(GeneralSpec generalSpec, NameEngine nameEngine)
      Description copied from interface: Floatable
      Produces a floating result.
      Specified by:
      toFloat in interface Floatable
      Returns:
      Floating representation of class.
    • toFloat

      public double toFloat()
    • toIrpString

      public String toIrpString(int radix)
      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 interface Floatable
      Specified by:
      toIrpString in class IrpObject
      Parameters:
      radix - Radix for parameters.
      Returns:
      Formatted string.
    • toElement

      public Element toElement(Document document)
      Specified by:
      toElement in interface Floatable
      Specified by:
      toElement in interface XmlExport
      Overrides:
      toElement in class IrpObject
      Returns:
    • 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.
      Specified by:
      weight in class IrpObject
      Returns:
      non-negative integer.
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in class IrpObject
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in class IrpObject
    • constant

      public boolean constant(NameEngine nameEngine)
      Specified by:
      constant in interface Floatable