Class Length

java.lang.Object
io.leandev.appfuse.measure.Length
All Implemented Interfaces:
Comparable<Length>

public class Length extends Object implements Comparable<Length>
  • Constructor Details

    • Length

      public Length(double value, Length.Unit unit)
  • Method Details

    • ofCentimeter

      public static Length ofCentimeter(double value)
    • ofMillimeter

      public static Length ofMillimeter(double value)
    • ofInch

      public static Length ofInch(double value)
    • ofPoint

      public static Length ofPoint(double value)
    • ofTwip

      public static Length ofTwip(double value)
    • getValue

      public double getValue()
    • getUnit

      public Length.Unit getUnit()
    • toPoint

      public double toPoint()
    • toTwip

      public double toTwip()
    • toMillimeter

      public double toMillimeter()
    • toInch

      public double toInch()
    • toCentimeter

      public double toCentimeter()
    • toPixel

      public int toPixel(int ppi)
    • toLength

      public Length toLength(Length.Unit unit)
    • add

      public Length add(Length augend)
    • subtract

      public Length subtract(Length subtrahend)
    • multiply

      public Length multiply(double multiplicand)
    • divide

      public Length divide(double divisor)
    • compareTo

      public int compareTo(Length length)
      Specified by:
      compareTo in interface Comparable<Length>
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object