All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.squarespace.cldrengine.api.Units Maven / Gradle / Ivy

The newest version!
package com.squarespace.cldrengine.api;

import java.util.List;

public interface Units {

  /**
   * Returns an array of available units.
   */
  List availableUnits();

  /**
   * Formats the given unit quantity to string.
   */
  String formatQuantity(Quantity qty);

  /**
   * Formats the given unit quantity to string.
   */
  String formatQuantity(Quantity qty, UnitFormatOptions options);

  /**
   * Formats the given unit quantity to an array of parts.
   */
  List formatQuantityToParts(Quantity qty);

  /**
   * Formats the given unit quantity to an array of parts.
   */
  List formatQuantityToParts(Quantity qty, UnitFormatOptions options);

  /**
   * Formats the given unit quantity sequence to string.
   */
  String formatQuantitySequence(List qty);

  /**
   * Formats the given unit quantity sequence to string.
   */
  String formatQuantitySequence(List qty, UnitFormatOptions options);

  /**
   * Formats the given unit quantity sequence to an array of parts.
   */
  List formatQuantitySequenceToParts(List qty);

  /**
   * Formats the given unit quantity sequence to an array of parts.
   */
  List formatQuantitySequenceToParts(List qty, UnitFormatOptions options);

  /**
   * Returns the display name for the given unit.
   */
  String getUnitDisplayName(UnitType unit, UnitLength length);

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy