Interface ServiceConfiguration


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 Details

    • getQuantityClasses

      Return a collection with all Quantity classes 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 ServiceProvider is registered/available.

      Returns:
      a collection with all implemented amount classes, not null.
    • getUnitClasses

      List a collection of Unit implementations.

      This enables the TCK to check the basic implementation compliance.

      Returns:
      a collection with Unit implementations to be tested.
    • getDimensionClasses

      List a collection of Dimension implementations.

      This enables the TCK to check the basic implementation compliance.

      Returns:
      a collection with Dimension implementations to be tested.
    • getPrefixClasses

      List a collection of Prefix implementations.

      This enables the TCK to check the basic implementation compliance.

      Returns:
      a collection with Prefix implementations to be tested.
      Since:
      2.0
    • getSupportedQuantityTypes

      Return a collection with all supported Quantity types. The list must not return null, 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

      <Q extends Quantity<Q>> Unit<Q> getUnit4Type(Class<Q> quantityType)
      Returns a matching unit for the specified quantity type. This is a "helper method" to avoid direct references to SystemOfUnits or 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