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