com.aspose.html.drawing

Class Numeric

  • All Implemented Interfaces:
    com.aspose.ms.System.IEquatable<Unit>
    Direct Known Subclasses:
    Dimension


    public abstract class Numeric
    extends Unit

    Provides the base class for numeric types.

    • Constructor Detail

      • Numeric

        public Numeric(Numeric.NumericInit initData)

        Initializes a new instance of the Unit class.

        Parameters:
        initData - The initialization data.
    • Method Detail

      • getValue

        public double getValue()

        Gets the unit value.

        Returns:
        The object value.
      • initialize

        public void initialize(Unit.UnitInit data)

        Initializes a unit with a specified data.

        Parameters:
        data - The data.
      • compareTo

        public int compareTo(Numeric other)

        Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

        Parameters:
        other - The other object to compare.
        Returns:
        A value that indicates the relative order of the objects being compared.
        Throws:
        com.aspose.ms.System.ArgumentNullException - other
        com.aspose.ms.System.ArgumentException
      • equals

        public boolean equals(Unit other)

        Determines whether the specified Unit, is equal to this instance.

        Overrides:
        equals in class Unit
        Parameters:
        other - The Unit to compare with this instance.
        Returns:
        true if the specified Unit is equal to this instance; otherwise, false.
      • hashCode

        public int hashCode()

        Returns a hash code for this instance.

        Overrides:
        hashCode in class Unit
        Returns:
        A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
        Throws:
        com.aspose.ms.System.NotImplementedException
      • toString

        public String toString()

        Returns a System.String that represents this instance.

        Overrides:
        toString in class Unit
        Returns:
        A System.String that represents this instance.
      • getValue

        public double getValue(UnitType unitType)

        Gets the value converted to the specified Drawing.UnitType.

        Parameters:
        unitType - Type of the unit.
        Returns:
        Returns value that is converted to specified type.
        Throws:
        com.aspose.ms.System.ArgumentNullException - unitType