Class Length
java.lang.Object
io.leandev.appfuse.measure.Length
- All Implemented Interfaces:
Comparable<Length>
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintdivide(double divisor) booleangetUnit()doublegetValue()inthashCode()multiply(double multiplicand) static LengthofCentimeter(double value) static LengthofInch(double value) static LengthofMillimeter(double value) static LengthofPoint(double value) static LengthofTwip(double value) doubledoubletoInch()toLength(Length.Unit unit) doubleinttoPixel(int ppi) doubletoPoint()doubletoTwip()
-
Constructor Details
-
Length
-
-
Method Details
-
ofCentimeter
-
ofMillimeter
-
ofInch
-
ofPoint
-
ofTwip
-
getValue
public double getValue() -
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
-
add
-
subtract
-
multiply
-
divide
-
compareTo
- Specified by:
compareToin interfaceComparable<Length>
-
equals
-
hashCode
-