• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * This code is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU General Public License version 2 only, as
7  * published by the Free Software Foundation.  Oracle designates this
8  * particular file as subject to the "Classpath" exception as provided
9  * by Oracle in the LICENSE file that accompanied this code.
10  *
11  * This code is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14  * version 2 for more details (a copy is included in the LICENSE file that
15  * accompanied this code).
16  *
17  * You should have received a copy of the GNU General Public License version
18  * 2 along with this work; if not, write to the Free Software Foundation,
19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20  *
21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22  * or visit www.oracle.com if you need additional information or have any
23  * questions.
24  */
25 
26 /*
27  * This file is available under and governed by the GNU General Public
28  * License version 2 only, as published by the Free Software Foundation.
29  * However, the following notice accompanied the original version of this
30  * file:
31  *
32  * Copyright (c) 2007-2012, Stephen Colebourne & Michael Nascimento Santos
33  *
34  * All rights reserved.
35  *
36  * Redistribution and use in source and binary forms, with or without
37  * modification, are permitted provided that the following conditions are met:
38  *
39  *  * Redistributions of source code must retain the above copyright notice,
40  *    this list of conditions and the following disclaimer.
41  *
42  *  * Redistributions in binary form must reproduce the above copyright notice,
43  *    this list of conditions and the following disclaimer in the documentation
44  *    and/or other materials provided with the distribution.
45  *
46  *  * Neither the name of JSR-310 nor the names of its contributors
47  *    may be used to endorse or promote products derived from this software
48  *    without specific prior written permission.
49  *
50  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
51  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
52  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
53  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
54  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
55  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
56  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
57  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
58  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
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.
61  */
62 
63 package java.time;
64 
65 import dalvik.annotation.compat.UnsupportedAppUsage;
66 
67 @SuppressWarnings({"unchecked", "deprecation", "all"})
68 public final class Duration
69         implements java.time.temporal.TemporalAmount,
70                 java.lang.Comparable<java.time.Duration>,
71                 java.io.Serializable {
72 
Duration(long seconds, int nanos)73     private Duration(long seconds, int nanos) {
74         throw new RuntimeException("Stub!");
75     }
76 
ofDays(long days)77     public static java.time.Duration ofDays(long days) {
78         throw new RuntimeException("Stub!");
79     }
80 
ofHours(long hours)81     public static java.time.Duration ofHours(long hours) {
82         throw new RuntimeException("Stub!");
83     }
84 
ofMinutes(long minutes)85     public static java.time.Duration ofMinutes(long minutes) {
86         throw new RuntimeException("Stub!");
87     }
88 
ofSeconds(long seconds)89     public static java.time.Duration ofSeconds(long seconds) {
90         throw new RuntimeException("Stub!");
91     }
92 
ofSeconds(long seconds, long nanoAdjustment)93     public static java.time.Duration ofSeconds(long seconds, long nanoAdjustment) {
94         throw new RuntimeException("Stub!");
95     }
96 
ofMillis(long millis)97     public static java.time.Duration ofMillis(long millis) {
98         throw new RuntimeException("Stub!");
99     }
100 
ofNanos(long nanos)101     public static java.time.Duration ofNanos(long nanos) {
102         throw new RuntimeException("Stub!");
103     }
104 
of(long amount, java.time.temporal.TemporalUnit unit)105     public static java.time.Duration of(long amount, java.time.temporal.TemporalUnit unit) {
106         throw new RuntimeException("Stub!");
107     }
108 
from(java.time.temporal.TemporalAmount amount)109     public static java.time.Duration from(java.time.temporal.TemporalAmount amount) {
110         throw new RuntimeException("Stub!");
111     }
112 
parse(java.lang.CharSequence text)113     public static java.time.Duration parse(java.lang.CharSequence text) {
114         throw new RuntimeException("Stub!");
115     }
116 
parseNumber( java.lang.CharSequence text, java.lang.String parsed, int multiplier, java.lang.String errorText)117     private static long parseNumber(
118             java.lang.CharSequence text,
119             java.lang.String parsed,
120             int multiplier,
121             java.lang.String errorText) {
122         throw new RuntimeException("Stub!");
123     }
124 
parseFraction( java.lang.CharSequence text, java.lang.String parsed, int negate)125     private static int parseFraction(
126             java.lang.CharSequence text, java.lang.String parsed, int negate) {
127         throw new RuntimeException("Stub!");
128     }
129 
create( boolean negate, long daysAsSecs, long hoursAsSecs, long minsAsSecs, long secs, int nanos)130     private static java.time.Duration create(
131             boolean negate,
132             long daysAsSecs,
133             long hoursAsSecs,
134             long minsAsSecs,
135             long secs,
136             int nanos) {
137         throw new RuntimeException("Stub!");
138     }
139 
between( java.time.temporal.Temporal startInclusive, java.time.temporal.Temporal endExclusive)140     public static java.time.Duration between(
141             java.time.temporal.Temporal startInclusive, java.time.temporal.Temporal endExclusive) {
142         throw new RuntimeException("Stub!");
143     }
144 
create(long seconds, int nanoAdjustment)145     private static java.time.Duration create(long seconds, int nanoAdjustment) {
146         throw new RuntimeException("Stub!");
147     }
148 
get(java.time.temporal.TemporalUnit unit)149     public long get(java.time.temporal.TemporalUnit unit) {
150         throw new RuntimeException("Stub!");
151     }
152 
getUnits()153     public java.util.List<java.time.temporal.TemporalUnit> getUnits() {
154         throw new RuntimeException("Stub!");
155     }
156 
isZero()157     public boolean isZero() {
158         throw new RuntimeException("Stub!");
159     }
160 
isNegative()161     public boolean isNegative() {
162         throw new RuntimeException("Stub!");
163     }
164 
getSeconds()165     public long getSeconds() {
166         throw new RuntimeException("Stub!");
167     }
168 
getNano()169     public int getNano() {
170         throw new RuntimeException("Stub!");
171     }
172 
withSeconds(long seconds)173     public java.time.Duration withSeconds(long seconds) {
174         throw new RuntimeException("Stub!");
175     }
176 
withNanos(int nanoOfSecond)177     public java.time.Duration withNanos(int nanoOfSecond) {
178         throw new RuntimeException("Stub!");
179     }
180 
plus(java.time.Duration duration)181     public java.time.Duration plus(java.time.Duration duration) {
182         throw new RuntimeException("Stub!");
183     }
184 
plus(long amountToAdd, java.time.temporal.TemporalUnit unit)185     public java.time.Duration plus(long amountToAdd, java.time.temporal.TemporalUnit unit) {
186         throw new RuntimeException("Stub!");
187     }
188 
plusDays(long daysToAdd)189     public java.time.Duration plusDays(long daysToAdd) {
190         throw new RuntimeException("Stub!");
191     }
192 
plusHours(long hoursToAdd)193     public java.time.Duration plusHours(long hoursToAdd) {
194         throw new RuntimeException("Stub!");
195     }
196 
plusMinutes(long minutesToAdd)197     public java.time.Duration plusMinutes(long minutesToAdd) {
198         throw new RuntimeException("Stub!");
199     }
200 
plusSeconds(long secondsToAdd)201     public java.time.Duration plusSeconds(long secondsToAdd) {
202         throw new RuntimeException("Stub!");
203     }
204 
plusMillis(long millisToAdd)205     public java.time.Duration plusMillis(long millisToAdd) {
206         throw new RuntimeException("Stub!");
207     }
208 
plusNanos(long nanosToAdd)209     public java.time.Duration plusNanos(long nanosToAdd) {
210         throw new RuntimeException("Stub!");
211     }
212 
plus(long secondsToAdd, long nanosToAdd)213     private java.time.Duration plus(long secondsToAdd, long nanosToAdd) {
214         throw new RuntimeException("Stub!");
215     }
216 
minus(java.time.Duration duration)217     public java.time.Duration minus(java.time.Duration duration) {
218         throw new RuntimeException("Stub!");
219     }
220 
minus(long amountToSubtract, java.time.temporal.TemporalUnit unit)221     public java.time.Duration minus(long amountToSubtract, java.time.temporal.TemporalUnit unit) {
222         throw new RuntimeException("Stub!");
223     }
224 
minusDays(long daysToSubtract)225     public java.time.Duration minusDays(long daysToSubtract) {
226         throw new RuntimeException("Stub!");
227     }
228 
minusHours(long hoursToSubtract)229     public java.time.Duration minusHours(long hoursToSubtract) {
230         throw new RuntimeException("Stub!");
231     }
232 
minusMinutes(long minutesToSubtract)233     public java.time.Duration minusMinutes(long minutesToSubtract) {
234         throw new RuntimeException("Stub!");
235     }
236 
minusSeconds(long secondsToSubtract)237     public java.time.Duration minusSeconds(long secondsToSubtract) {
238         throw new RuntimeException("Stub!");
239     }
240 
minusMillis(long millisToSubtract)241     public java.time.Duration minusMillis(long millisToSubtract) {
242         throw new RuntimeException("Stub!");
243     }
244 
minusNanos(long nanosToSubtract)245     public java.time.Duration minusNanos(long nanosToSubtract) {
246         throw new RuntimeException("Stub!");
247     }
248 
multipliedBy(long multiplicand)249     public java.time.Duration multipliedBy(long multiplicand) {
250         throw new RuntimeException("Stub!");
251     }
252 
dividedBy(long divisor)253     public java.time.Duration dividedBy(long divisor) {
254         throw new RuntimeException("Stub!");
255     }
256 
257     @UnsupportedAppUsage
toSeconds()258     private java.math.BigDecimal toSeconds() {
259         throw new RuntimeException("Stub!");
260     }
261 
create(java.math.BigDecimal seconds)262     private static java.time.Duration create(java.math.BigDecimal seconds) {
263         throw new RuntimeException("Stub!");
264     }
265 
negated()266     public java.time.Duration negated() {
267         throw new RuntimeException("Stub!");
268     }
269 
abs()270     public java.time.Duration abs() {
271         throw new RuntimeException("Stub!");
272     }
273 
addTo(java.time.temporal.Temporal temporal)274     public java.time.temporal.Temporal addTo(java.time.temporal.Temporal temporal) {
275         throw new RuntimeException("Stub!");
276     }
277 
subtractFrom(java.time.temporal.Temporal temporal)278     public java.time.temporal.Temporal subtractFrom(java.time.temporal.Temporal temporal) {
279         throw new RuntimeException("Stub!");
280     }
281 
toDays()282     public long toDays() {
283         throw new RuntimeException("Stub!");
284     }
285 
toHours()286     public long toHours() {
287         throw new RuntimeException("Stub!");
288     }
289 
toMinutes()290     public long toMinutes() {
291         throw new RuntimeException("Stub!");
292     }
293 
toMillis()294     public long toMillis() {
295         throw new RuntimeException("Stub!");
296     }
297 
toNanos()298     public long toNanos() {
299         throw new RuntimeException("Stub!");
300     }
301 
compareTo(java.time.Duration otherDuration)302     public int compareTo(java.time.Duration otherDuration) {
303         throw new RuntimeException("Stub!");
304     }
305 
equals(java.lang.Object otherDuration)306     public boolean equals(java.lang.Object otherDuration) {
307         throw new RuntimeException("Stub!");
308     }
309 
hashCode()310     public int hashCode() {
311         throw new RuntimeException("Stub!");
312     }
313 
toString()314     public java.lang.String toString() {
315         throw new RuntimeException("Stub!");
316     }
317 
writeReplace()318     private java.lang.Object writeReplace() {
319         throw new RuntimeException("Stub!");
320     }
321 
readObject(java.io.ObjectInputStream s)322     private void readObject(java.io.ObjectInputStream s) throws java.io.InvalidObjectException {
323         throw new RuntimeException("Stub!");
324     }
325 
writeExternal(java.io.DataOutput out)326     void writeExternal(java.io.DataOutput out) throws java.io.IOException {
327         throw new RuntimeException("Stub!");
328     }
329 
readExternal(java.io.DataInput in)330     static java.time.Duration readExternal(java.io.DataInput in) throws java.io.IOException {
331         throw new RuntimeException("Stub!");
332     }
333 
334     private static final java.math.BigInteger BI_NANOS_PER_SECOND;
335 
336     static {
337         BI_NANOS_PER_SECOND = null;
338     }
339 
340     private static final java.util.regex.Pattern PATTERN;
341 
342     static {
343         PATTERN = null;
344     }
345 
346     public static final java.time.Duration ZERO;
347 
348     static {
349         ZERO = null;
350     }
351 
352     private final int nanos;
353 
354     {
355         nanos = 0;
356     }
357 
358     private final long seconds;
359 
360     {
361         seconds = 0;
362     }
363 
364     private static final long serialVersionUID = 3078945930695997490L; // 0x2aba9d02d1c4f832L
365 
366     @SuppressWarnings({"unchecked", "deprecation", "all"})
367     private static class DurationUnits {
368 
DurationUnits()369         private DurationUnits() {
370             throw new RuntimeException("Stub!");
371         }
372 
373         static final java.util.List<java.time.temporal.TemporalUnit> UNITS;
374 
375         static {
376             UNITS = null;
377         }
378     }
379 }
380