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 class
Length.Inches
ALength
with the intrinsic unit inches.static class
Length.LengthFactory<L extends Length>
Factory for creating length values in various different units.static class
Length.Points
ALength
with the intrinsic unit points.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Default Methods Modifier and Type Method Description double
centimeters()
Gets the length in centimeters.default char
charAt(int index)
default IntStream
chars()
default IntStream
codePoints()
double
decimeters()
Gets the length in decimeters.boolean
equals(Object obj)
double
getIntrinsicValue()
Gets the intrinsic value in the unit of this length attribute.protected abstract double
getScaleIntrinsicToInches()
int
hashCode()
double
inches()
Gets the length in inches.default int
length()
double
millimeters()
Gets the length in millimeters.double
points()
Gets the length in points.default CharSequence
subSequence(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.String
toString()
-
-
-
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:
toString
in 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:
charAt
in interfaceCharSequence
-
chars
public default IntStream chars()
- Specified by:
chars
in interfaceCharSequence
-
codePoints
public default IntStream codePoints()
- Specified by:
codePoints
in interfaceCharSequence
-
length
public default int length()
- Specified by:
length
in interfaceCharSequence
-
subSequence
public default CharSequence subSequence(int start, int end)
- Specified by:
subSequence
in interfaceCharSequence
-
-