Home | History | Annotate | Download | only in time

Lines Matching defs:of

6  * under the terms of the GNU General Public License version 2 only, as
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 * You should have received a copy of the GNU General Public License version
29 * However, the following notice accompanied the original version of this
39 * * Redistributions of source code must retain the above copyright notice,
40 * this list of conditions and the following disclaimer.
43 * this list of conditions and the following disclaimer in the documentation
46 * * Neither the name of JSR-310 nor the names of its contributors
52 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
56 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
57 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
59 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
60 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
94 * There are two distinct types of ID:
98 * <li>Geographical regions - an area where a specific set of rules for finding
112 * Similarly, a comparison of two IDs only examines the ID, whereas
113 * a comparison of two rules examines the entire data set.
117 * There are three types of ID.
119 * The simplest type of ID is that from {@code ZoneOffset}.
120 * This consists of 'Z' and IDs starting with '+' or '-'.
122 * The next type of ID are offset-style IDs with some form of prefix,
128 * The third type of ID are region-based IDs. A region-based ID must be of
135 * There are a number of organizations, known here as groups, that monitor
147 * However, the airport of Utrecht has the code 'UTC', which is obviously a conflict.
166 * This abstract class has two implementations, both of which are immutable and thread-safe.
175 * A map of zone overrides to enable the short time-zone names to be used.
177 * Use of short zone IDs has been deprecated in {@code java.util.TimeZone}.
179 * {@link #of(String, Map)} factory method.
181 * This map contains a mapping of the IDs that is in line with TZDB 2005r and
262 * then the result of this method will also change.
273 * Gets the set of available zone IDs.
275 * This set includes the string form of all available region-based IDs.
277 * The ID can be passed to {@link #of(String)} to create a {@code ZoneId}.
279 * The set of zone IDs can increase over time, although in a typical application
280 * the set of IDs is fixed. Each call to this method is thread-safe.
282 * @return a modifiable copy of the set of zone IDs, not null
290 * Obtains an instance of {@code ZoneId} using its ID using a map
291 * of aliases to supplement the standard zone IDs.
293 * Many users of time-zones use short abbreviations, such as PST for
296 * This method allows a map of string to time-zone to be setup and reused
300 * @param aliasMap a map of alias zone IDs (typically abbreviations) to real zone IDs, not null
305 public static ZoneId of(String zoneId, Map<String, String> aliasMap) {
310 return of(id);
314 * Obtains an instance of {@code ZoneId} from an ID ensuring that the
324 * <li>If the zone ID consists of a single letter, the zone ID is invalid
327 * {@code ZoneOffset} using {@link ZoneOffset#of(String)}.
333 * The suffix is parsed as a {@link ZoneOffset#of(String) ZoneOffset}.
336 * The rules of the returned {@code ZoneId} will be equivalent to the
341 * in the configured set of IDs, {@code ZoneRulesException} is thrown.
342 * The detailed format of the region ID depends on the group supplying the data.
343 * The default set of data is supplied by the IANA Time Zone Database (TZDB).
344 * This has region IDs of the form '{area}/{city}', such as 'Europe/Paris' or 'America/New_York'.
353 public static ZoneId of(String zoneId) {
354 return of(zoneId, true);
358 * Obtains an instance of {@code ZoneId} wrapping an offset.
367 * @throws IllegalArgumentException if the prefix is not one of
397 static ZoneId of(String zoneId, boolean checkAvailable) {
400 return ZoneOffset.of(zoneId);
413 * @param prefixLength the length of the prefix, 2 or 3
426 ZoneOffset offset = ZoneOffset.of(zoneId.substring(prefixLength));
438 * Obtains an instance of {@code ZoneId} from a temporal object.
441 * A {@code TemporalAccessor} represents an arbitrary set of date and time information,
442 * which this factory converts to an instance of {@code ZoneId}.
444 * A {@code TemporalAccessor} represents some form of date and time information.
445 * This factory converts the arbitrary temporal object to an instance of {@code ZoneId}.
450 * This method matches the signature of the functional interface {@link TemporalQuery}
461 temporal + " of type " + temporal.getClass().getName());
481 * The format of an offset based ID is defined by {@link ZoneOffset#getId()}.
489 * Gets the textual representation of the zone, such as 'British Time' or
494 * The parameters control the style of the returned text and the locale.
498 * @param style the length of the text required, not null
500 * @return the text value of the zone, not null
510 * However, the interface is not implemented by this class as most of the
514 * supporting the return of the zone using {@link TemporalQueries#zoneId()}.
551 * {@link ZoneOffset} will always return a set of rules where the offset never changes.
561 * The returns a normalized {@code ZoneId} that can be used in place of this ID.
565 * The normalization checks if the rules of this {@code ZoneId} have a fixed offset.
628 * @return a string representation of this time-zone ID, not null
646 * {@link #of(String)}, but without any exception in the case where the
647 * ID has a valid format, but is not in the known set of region-based IDs.
649 * @return the instance of {@code Ser}, not null