public interface SystemOfUnitsService
system
of units.
Common systems of units are "SI" (System International) or Metric system, "Imperial" (British), or "US" (US Customary).
| Modifier and Type | Method and Description |
|---|---|
java.util.Collection<SystemOfUnits> |
getAvailableSystemsOfUnits()
Gets a list with available systems for this
SystemOfUnitsService. |
default java.util.Set<Prefix> |
getPrefixes(java.lang.Class prefixType)
Returns a
Set containing the values of a particular Prefix
type.This method may be used to iterate over the prefixes as follows: |
SystemOfUnits |
getSystemOfUnits()
Returns the default
system of units. |
SystemOfUnits |
getSystemOfUnits(java.lang.String name)
Returns the system of units having the specified name or
null if
none is found. |
SystemOfUnits getSystemOfUnits()
system of units. Depending on the
implementation this may be the International
System of Units or another default system.SystemOfUnits getSystemOfUnits(java.lang.String name)
null if
none is found.name - the system of unit name.java.util.Collection<SystemOfUnits> getAvailableSystemsOfUnits()
SystemOfUnitsService.default java.util.Set<Prefix> getPrefixes(java.lang.Class prefixType)
Set containing the values of a particular Prefix
type.
for(Prefix p : service.getPrefixes(PrefixType.class))
System.out.println(p);
prefixType - the Prefix typejava.lang.ClassCastException - if the class is not compatible with the desired
Prefix implementation or does not implement Prefix at all.Copyright © 2014–2018 Jean-Marie Dautelle, Werner Keil, Otavio Santana. All rights reserved.