Package com.xffffff.wellfed.unit
Class Unit
- java.lang.Object
-
- com.xffffff.wellfed.unit.Unit
-
- Direct Known Subclasses:
CountUnit
,MassUnit
,VolumeUnit
public abstract class Unit extends java.lang.Object
Unit is an abstract class that contains the conversion factor and unit
-
-
Field Summary
Fields Modifier and Type Field Description protected double
conversionFactor
The conversion factor for the unitprotected java.util.Set<java.lang.String>
systems
The unit systems that the unit is in
-
Constructor Summary
Constructors Constructor Description Unit(java.lang.String unit)
The constructor for the Unit class that initializes the unit
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getConversionFactor()
The getter for the conversion factorjava.util.Set<java.lang.String>
getSystems()
The getter for the unit systemsjava.lang.String
getUnit()
The getter for the unit string
-
-
-
Method Detail
-
getUnit
public java.lang.String getUnit()
The getter for the unit string- Returns:
- the unit string
-
getConversionFactor
public double getConversionFactor()
The getter for the conversion factor- Returns:
- the conversion factor
-
getSystems
public java.util.Set<java.lang.String> getSystems()
The getter for the unit systems- Returns:
- the unit systems
-
-