Class Length.LengthFactory<L extends Length>

  • Type Parameters:
    L - Type of the length.
    Enclosing class:
    Length

    public static final class Length.LengthFactory<L extends Length>
    extends Object
    Factory for creating length values in various different units.
    Since:
    8.2.0
    Author:
    XIMA MEDIA GmbH
    • Constructor Detail

      • LengthFactory

        protected LengthFactory​(double scaleInchesToIntrinsic,
                                DoubleFunction<L> ctor)
    • Method Detail

      • fromCentimeters

        public L fromCentimeters​(double centimeters)
        Creates a new length for the given value.
        Parameters:
        centimeters - Length in centimeters.
        Returns:
        A new length with the given value.
      • fromDecimeters

        public L fromDecimeters​(double decimeters)
        Creates a new length for the given value.
        Parameters:
        decimeters - Length in decimeters.
        Returns:
        A new length with the given value.
      • fromInches

        public L fromInches​(double inches)
        Creates a new length for the given value.
        Parameters:
        inches - Length in inches.
        Returns:
        A new length with the given value.
      • fromMillimeters

        public L fromMillimeters​(double millimeters)
        Creates a new length for the given value.
        Parameters:
        millimeters - Length in millimeters.
        Returns:
        A new length with the given value.
      • fromPoints

        public L fromPoints​(double points)
        Creates a new length for the given value.
        Parameters:
        points - Length in points.
        Returns:
        A new length with the given value.