org.cts.units
Interface Quantity


public interface Quantity

According to wikipedia, quantity is a kind of property which exists as magnitude or multitude. Mass, time, distance, heat, and angular separation are among the familiar examples of quantitative properties. This interface has no particular method, and let programmers free to implement Quantities as they want. A internal Factory class has been added to help creating Quantities from a simple String. To use it, just write :

Quantity SPEED = Quantity.Factory.create("Speed");
Otherwise, you can create your own implementation of Quantity :
 public class Speed implements Quantity {
     // your implementation
 }
 
Note that two quantities are considered as comparable if their toString method return equalsIgnoreCase values. For a complete package about units, quantities and measurements, see JSR-275.

Author:
Michaƫl Michaud

Nested Class Summary
static class Quantity.Factory
          A factory to easily create Quantities from simple Strings.
 
Field Summary
static Quantity ANGLE
           
static Quantity LENGTH
           
static Quantity NODIM
           
static Quantity TIME
           
 

Field Detail

LENGTH

static final Quantity LENGTH

ANGLE

static final Quantity ANGLE

NODIM

static final Quantity NODIM

TIME

static final Quantity TIME


Copyright © 2014 IRSTV CNRS-FR-2488. All Rights Reserved.