public abstract class AbstractServiceProvider extends javax.measure.spi.ServiceProvider implements Comparable<javax.measure.spi.ServiceProvider>
ServiceProvider class and hereby uses the JDK ServiceLoader to load the required
services.| Constructor and Description |
|---|
AbstractServiceProvider() |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(javax.measure.spi.ServiceProvider o) |
javax.measure.spi.FormatService |
getFormatService() |
<Q extends javax.measure.Quantity<Q>> |
getQuantityFactory(Class<Q> quantity)
Return a factory for this quantity
|
protected <T> T |
getService(Class<T> serviceType) |
protected <T> List<T> |
getServices(Class<T> serviceType)
Loads and registers services.
|
javax.measure.spi.SystemOfUnitsService |
getSystemOfUnitsService() |
abstract String |
toString() |
public AbstractServiceProvider()
protected <T> List<T> getServices(Class<T> serviceType)
T - the concrete type.serviceType - The service type.null.protected <T> T getService(Class<T> serviceType)
public int compareTo(javax.measure.spi.ServiceProvider o)
compareTo in interface Comparable<javax.measure.spi.ServiceProvider>public javax.measure.spi.SystemOfUnitsService getSystemOfUnitsService()
getSystemOfUnitsService in class javax.measure.spi.ServiceProviderpublic javax.measure.spi.FormatService getFormatService()
getFormatService in class javax.measure.spi.ServiceProviderpublic final <Q extends javax.measure.Quantity<Q>> javax.measure.spi.QuantityFactory<Q> getQuantityFactory(Class<Q> quantity)
getQuantityFactory in class javax.measure.spi.ServiceProviderquantity - the quantity typeQuantityFactoryNullPointerException - if quantity is nullCopyright © 2005–2021 Units of Measurement project. All rights reserved.