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

com.ibm.icu.impl.duration.PeriodBuilder Maven / Gradle / Ivy

Go to download

Vaadin is a web application framework for Rich Internet Applications (RIA). Vaadin enables easy development and maintenance of fast and secure rich web applications with a stunning look and feel and a wide browser support. It features a server-side architecture with the majority of the logic running on the server. Ajax technology is used at the browser-side to ensure a rich and interactive user experience.

There is a newer version: 1.2.0
Show newest version
/*
******************************************************************************
* Copyright (C) 2007, International Business Machines Corporation and   *
* others. All Rights Reserved.                                               *
******************************************************************************
*/

package com.ibm.icu.impl.duration;

import java.util.TimeZone;

/**
 * Constructs a Period given a base time and a duration in milliseconds.
 * 

* PeriodBuilder may be used alone or be set on a DurationFormatter * to customize how that formatter constructs a Period for formatting. *

* None of the operations on PeriodBuilder change the current builder. */ public interface PeriodBuilder { /** * Create a period of the given duration using the current system * time as the reference time. * * @param duration the duration in milliseconds from the current time * to the target time. A negative duration indicates a time in the past * @return a Period that represents the duration */ Period create(long duration); /** * Create a period of the given duration using the provided reference date. * * @param duration the duration in milliseconds from the referenct time * to the target time. A negative duration indicates a time before the * reference time * @param referenceDate the reference date from which to compute the period * @return a Period that represents the duration */ Period createWithReferenceDate(long duration, long referenceDate); /** * Returns a new PeriodBuilder that uses the provided locale to * determine what periods are available for use. */ PeriodBuilder withLocale(String localeName); /** * Returns a new PeriodBuilder that computes periods starting at * dates in the provided time zone. */ PeriodBuilder withTimeZone(TimeZone tz); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy