Package de.xima.fc.common.graphdot
Class Length
- java.lang.Object
-
- de.xima.fc.common.graphdot.Length
-
- All Implemented Interfaces:
Serializable,CharSequence
- Direct Known Subclasses:
Length.Inches,Length.Points
public abstract class Length extends Object
A length with some intrinsic unit for graphviz attribute values.- Since:
- 8.2.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLength.InchesALengthwith the intrinsic unit inches.static classLength.LengthFactory<L extends Length>Factory for creating length values in various different units.static classLength.PointsALengthwith the intrinsic unit points.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Default Methods Modifier and Type Method Description doublecentimeters()Gets the length in centimeters.default charcharAt(int index)default IntStreamchars()default IntStreamcodePoints()doubledecimeters()Gets the length in decimeters.booleanequals(Object obj)doublegetIntrinsicValue()Gets the intrinsic value in the unit of this length attribute.protected abstract doublegetScaleIntrinsicToInches()inthashCode()doubleinches()Gets the length in inches.default intlength()doublemillimeters()Gets the length in millimeters.doublepoints()Gets the length in points.default CharSequencesubSequence(int start, int end)static Length.LengthFactory<Length.Inches>toInches()Gets a factory for creating length values in inches.static Length.LengthFactory<Length.Points>toPoints()Gets a factory for creating length values in points.StringtoString()
-
-
-
Method Detail
-
centimeters
public final double centimeters()
Gets the length in centimeters.- Returns:
- The length in centimeters.
-
decimeters
public final double decimeters()
Gets the length in decimeters.- Returns:
- The length in decimeters.
-
getIntrinsicValue
public final double getIntrinsicValue()
Gets the intrinsic value in the unit of this length attribute.- Returns:
- The intrinsic value in the unit of this length attribute.
-
inches
public final double inches()
Gets the length in inches.- Returns:
- The length in inches.
-
millimeters
public final double millimeters()
Gets the length in millimeters.- Returns:
- The length in millimeters.
-
points
public final double points()
Gets the length in points.- Returns:
- The length in points.
-
toString
public final String toString()
- Specified by:
toStringin interfaceCharSequence
-
getScaleIntrinsicToInches
protected abstract double getScaleIntrinsicToInches()
-
toInches
public static Length.LengthFactory<Length.Inches> toInches()
Gets a factory for creating length values in inches.- Returns:
- A factory for creating length values in inches.
-
toPoints
public static Length.LengthFactory<Length.Points> toPoints()
Gets a factory for creating length values in points.- Returns:
- A factory for creating length values in points.
-
charAt
public default char charAt(int index)
- Specified by:
charAtin interfaceCharSequence
-
chars
public default IntStream chars()
- Specified by:
charsin interfaceCharSequence
-
codePoints
public default IntStream codePoints()
- Specified by:
codePointsin interfaceCharSequence
-
length
public default int length()
- Specified by:
lengthin interfaceCharSequence
-
subSequence
public default CharSequence subSequence(int start, int end)
- Specified by:
subSequencein interfaceCharSequence
-
-