2 **************************************************************************
\r
3 * Copyright (C) 2008-2009, Google, International Business Machines
\r
4 * Corporation and others. All Rights Reserved.
\r
5 **************************************************************************
\r
7 package com.ibm.icu.util;
\r
10 * Express a duration as a time unit and number. Patterned after Currency.
\r
12 * @see TimeUnitAmount
\r
13 * @see com.ibm.icu.text.TimeUnitFormat
\r
17 public class TimeUnitAmount extends Measure {
\r
20 * Create from a number and unit.
\r
23 public TimeUnitAmount(Number number, TimeUnit unit) {
\r
24 super(number, unit);
\r
28 * Create from a number and unit.
\r
31 public TimeUnitAmount(double number, TimeUnit unit) {
\r
32 super(new Double(number), unit);
\r
36 * Get the unit (convenience to avoid cast).
\r
39 public TimeUnit getTimeUnit() {
\r
40 return (TimeUnit) getUnit();
\r