> For the complete documentation index, see [llms.txt](https://unitsofmeasurement.gitbook.io/unit-ri-userguide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://unitsofmeasurement.gitbook.io/unit-ri-userguide/factory-accessors/quantities.md).

# Quantities

The reference implementation provides a singleton factory accessor class `Quantities`, like `Collections` and other similar classes in the JDK. This class is a “convenience” facade over having to retrieve a new instance of `QuantityFactory` via the SPI for obtaining new `Quantity` instances. Examples:

```
Qantity<Time> t = Quantities.getQuantity(12, MILLI(SECOND));
Quantity<Length> len = Quantities.getQuantity(34.5, KILO(METRE));
```
