All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gw.util.science.DensityUnit.gs Maven / Gradle / Ivy

There is a newer version: 1.18.2
Show newest version
package gw.util.science
uses gw.util.Rational

final class DensityUnit extends AbstractQuotientUnit {
  final static var CACHE: UnitCache = new UnitCache()

  public static var BASE: DensityUnit = get( Kilogram, VolumeUnit.BASE )

  static function get( massUnit: MassUnit, volumeUnit: VolumeUnit, factor: Rational = null, name: String = null, symbol: String = null ) : DensityUnit {
    var unit = new DensityUnit( massUnit, volumeUnit, factor, name, symbol )
    return CACHE.get( unit )
  }
  
  private construct( massUnit: MassUnit, volumeUnit: VolumeUnit, factor: Rational = null, name: String = null, symbol: String = null ) {
    super( massUnit, volumeUnit, factor, name, symbol )
  }  

  property get MassUnit() : MassUnit {
    return LeftUnit 
  }
  property get VolumeUnit() : VolumeUnit {
    return RightUnit 
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy