public interface ServiceConfiguration
Libraries that implement this JSR and want to be tested with this TCK must implement this
interface and register it using the
ServiceLoader.- Since:
- 1.0
- Version:
- 2.1, December 5, 2022
- Author:
- Werner Keil
-
Method Summary
Modifier and TypeMethodDescriptionThis method returns the base dimensions to be tested for requirements and recommendations.List a collection ofDimensionimplementations.default Collection<Class>List a collection ofPrefiximplementations.Return a collection with allQuantityclasses that are implemented.This method allows instances of QuantityFormat to be tested for requirements and recommendations.Collection<Class<? extends Quantity>>Return a collection with all supportedQuantitytypes.getUnit4Type(Class<Q> quantityType) Returns a matching unit for the specified quantity type.List a collection ofUnitimplementations.This method allows instances of UnitConverter to be tested for requirements and recommendations.This method allows instances of UnitFormat to be tested for requirements and recommendations.Collection<? extends Unit<?>>This method allows instances of Unit to be tested for requirements and recommendations.
-
Method Details
-
getQuantityClasses
Return a collection with allQuantityclasses that are implemented. The list must not be empty and should contain every quantity class implemented.This enables the TCK to check in addition to the basic implementation compliance, if according
ServiceProvideris registered/available.- Returns:
- a collection with all implemented amount classes, not null.
-
getUnitClasses
List a collection ofUnitimplementations.This enables the TCK to check the basic implementation compliance.
- Returns:
- a collection with Unit implementations to be tested.
-
getDimensionClasses
List a collection ofDimensionimplementations.This enables the TCK to check the basic implementation compliance.
- Returns:
- a collection with
Dimensionimplementations to be tested.
-
getPrefixClasses
List a collection ofPrefiximplementations.This enables the TCK to check the basic implementation compliance.
- Returns:
- a collection with
Prefiximplementations to be tested. - Since:
- 2.0
-
getSupportedQuantityTypes
Collection<Class<? extends Quantity>> getSupportedQuantityTypes()Return a collection with all supportedQuantitytypes. The list must not returnnull, but could be empty in certain profiles.- Returns:
- the list of quantity types to be checked, not
null. It is allowed to return an empty list here, which will return a collection with all implemented quantity classes, not null.
-
getUnit4Type
Returns a matching unit for the specified quantity type. This is a "helper method" to avoid direct references toSystemOfUnitsor implementations in profiles without SPI.- Type Parameters:
Q- the compile-time quantity type.- Parameters:
quantityType- the quantity type.- Returns:
- the unit for the specified quantity.
-
getUnits4Test
Collection<? extends Unit<?>> getUnits4Test()This method allows instances of Unit to be tested for requirements and recommendations.- Returns:
- the list of units to be checked, not null. It is allowed to return an empty list here, which will disable certain TCK tests, e.g. if the result isn't needed by a particular profile.
-
getBaseDimensions
This method returns the base dimensions to be tested for requirements and recommendations.- Returns:
- the list of base dimensions to be checked, not null. It is allowed to return an empty list here, which will disable certain TCK tests, e.g. if the result isn't needed by a particular profile.
-
getUnitConverters4Test
This method allows instances of UnitConverter to be tested for requirements and recommendations.- Returns:
- the list of unit converters to be checked, not null. It is allowed to return an empty list here, which will disable TCK tests for UnitConverter instances.
-
getUnitFormats4Test
This method allows instances of UnitFormat to be tested for requirements and recommendations.- Returns:
- the list of unit converters to be checked, not null. It is allowed to return an empty list here, which will disable certain TCK tests, e.g. if the result isn't needed by a particular profile.
-
getQuantityFormats4Test
This method allows instances of QuantityFormat to be tested for requirements and recommendations.- Returns:
- the list of unit converters to be checked, not null. It is allowed to return an empty list here, which will disable certain TCK tests, e.g. if the result isn't needed by a particular profile.
- Since:
- 2.0
-