squants

package squants

Squants

The Scala API for Quantities, Units of Measure and Dimensional Analysis

Overview

Squants is a framework of data types and a domain specific language (DSL) for representing Quantities, their Units of Measure, and their Dimensional relationships. The API supports typesafe dimensional analysis, improved domain models and more. All types are immutable and thread-safe.

Typedefs and implicits for common usages

Source
package.scala
Version

0.1

Since

0.1

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. squants
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. abstract class AbstractQuantityNumeric[A <: Quantity[A]] extends Numeric[A]

    Base class for creating objects to manage quantities as Numeric.

  2. type Acceleration = squants.motion.Acceleration

  3. type Angle = squants.space.Angle

  4. type Area = squants.space.Area

  5. trait BaseDimension extends AnyRef

    SI Base Quantity

  6. type ChemicalAmount = squants.mass.ChemicalAmount

  7. type Density = squants.mass.Density

  8. trait Dimension[A <: Quantity[A]] extends AnyRef

    Represents a Dimension or Quantity Type

  9. final class Dimensionless extends Quantity[Dimensionless] with TimeIntegral[Frequency]

    Represents a quantity of some thing for which there is no dimension.

  10. trait DimensionlessUnit extends UnitOfMeasure[Dimensionless] with UnitConverter

    Base trait for units of squants.Dimensionless

  11. case class DoubleVector(coordinates: Double*) extends SVector[Double] with Product with Serializable

    Double (Real Number) Vector

  12. type ElectricCurrent = squants.electro.ElectricCurrent

  13. type Energy = squants.energy.Energy

  14. type Force = squants.motion.Force

  15. type Jerk = squants.motion.Jerk

  16. type Length = squants.space.Length

  17. trait LikeRatio[A <: Quantity[A]] extends Ratio[A, A]

  18. type LuminousIntensity = squants.photo.LuminousIntensity

  19. type Mass = squants.mass.Mass

  20. type MassFlow = squants.motion.MassFlow

  21. type Momentum = squants.motion.Momentum

  22. type Money = squants.market.Money

  23. type Power = squants.energy.Power

  24. type PowerRamp = squants.energy.PowerRamp

  25. type Price[A <: Quantity[A]] = squants.market.Price[A]

  26. trait PrimaryUnit extends UnitConverter

    Identifies the Unit of Measure with a conversionFactor of 1.

  27. abstract class Quantity[A <: Quantity[A]] extends Serializable with Ordered[A]

    A base class for measurable quantities, instances of which contain a value and a unit

  28. case class QuantityParseException(message: String, expression: String) extends Exception with Product with Serializable

  29. case class QuantityRange[A <: Quantity[A]](lower: A, upper: A) extends Product with Serializable

    Represents a Range starting at one Quantity value and going up to another

  30. type QuantitySeries[A <: Quantity[A]] = IndexedSeq[QuantityRange[A]]

  31. case class QuantityVector[A <: Quantity[A]](coordinates: A*) extends SVector[A] with Product with Serializable

    Quantity Vector

  32. trait Ratio[A <: Quantity[A], B <: Quantity[B]] extends AnyRef

    Defines an interface and partial implementation for types that represent a ratio between any two quantities

  33. trait SVector[A] extends AnyRef

    Root trait for representing Vectors

  34. trait SiBaseUnit extends SiUnit

    A marker trait identifying SI Base Units

  35. trait SiUnit extends AnyRef

    A market trait identifying SI Units

  36. type SolidAngle = squants.space.SolidAngle

  37. implicit class SquantifiedBigDecimal extends AnyRef

    Provides implicit conversions that allow BigDecimals to lead in * operations

  38. implicit class SquantifiedDouble extends AnyRef

    Provides implicit conversions that allow Doubles to lead in * operations

  39. implicit class SquantifiedLong extends AnyRef

    Provides implicit conversions that allow Longs to lead in * operations

  40. type Temperature = squants.thermal.Temperature

  41. type Time = squants.time.Time

  42. trait UnitConverter extends AnyRef

    A Unit of Measure that require a simple multiplier for converting to and from the underlying value's unit

  43. trait UnitOfMeasure[A <: Quantity[A]] extends Serializable

    A Unit of Measure is used to define the scale of a quantity measurement

  44. type Velocity = squants.motion.Velocity

  45. type Volume = squants.space.Volume

  46. type VolumeFlow = squants.motion.VolumeFlow

Value Members

  1. val Amperes: squants.electro.Amperes.type

  2. object BinarySystem

    Singleton defining Metric System multipliers

  3. val Candelas: squants.photo.Candelas.type

  4. object Dimensionless extends Dimension[Dimensionless] with Serializable

    Factory singleton for squants.Dimensionless

  5. object DimensionlessConversions

  6. object Dozen extends DimensionlessUnit

    Represents a unit of dozen (12)

  7. object Each extends DimensionlessUnit with PrimaryUnit with SiUnit

    Represents a unit of singles

  8. object Gross extends DimensionlessUnit

    Represents a unit of gross (144)

  9. val Kelvin: squants.thermal.Kelvin.type

  10. val Kilograms: squants.mass.Kilograms.type

  11. val Meters: squants.space.Meters.type

  12. object MetricSystem

    Singleton defining Metric System multipliers

  13. val Moles: squants.mass.Moles.type

  14. object Percent extends DimensionlessUnit

    Represents a number of hundredths (0.

  15. val Radians: squants.space.Radians.type

  16. object SVector

  17. object Score extends DimensionlessUnit

    Represents a unit of scores (20)

  18. val Seconds: squants.time.Seconds.type

  19. val SquareRadians: SquaredRadians.type

  20. package electro

  21. package energy

  22. package information

  23. package market

    Squants Market API

  24. package mass

  25. package motion

  26. package photo

  27. package radio

  28. package space

  29. package thermal

  30. package time

Inherited from AnyRef

Inherited from Any

Ungrouped