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 OffsetDateTime 69 implements java.time.temporal.Temporal, 70 java.time.temporal.TemporalAdjuster, 71 java.lang.Comparable<java.time.OffsetDateTime>, 72 java.io.Serializable { 73 74 @UnsupportedAppUsage OffsetDateTime(java.time.LocalDateTime dateTime, java.time.ZoneOffset offset)75 private OffsetDateTime(java.time.LocalDateTime dateTime, java.time.ZoneOffset offset) { 76 throw new RuntimeException("Stub!"); 77 } 78 timeLineOrder()79 public static java.util.Comparator<java.time.OffsetDateTime> timeLineOrder() { 80 throw new RuntimeException("Stub!"); 81 } 82 compareInstant( java.time.OffsetDateTime datetime1, java.time.OffsetDateTime datetime2)83 private static int compareInstant( 84 java.time.OffsetDateTime datetime1, java.time.OffsetDateTime datetime2) { 85 throw new RuntimeException("Stub!"); 86 } 87 now()88 public static java.time.OffsetDateTime now() { 89 throw new RuntimeException("Stub!"); 90 } 91 now(java.time.ZoneId zone)92 public static java.time.OffsetDateTime now(java.time.ZoneId zone) { 93 throw new RuntimeException("Stub!"); 94 } 95 now(java.time.Clock clock)96 public static java.time.OffsetDateTime now(java.time.Clock clock) { 97 throw new RuntimeException("Stub!"); 98 } 99 of( java.time.LocalDate date, java.time.LocalTime time, java.time.ZoneOffset offset)100 public static java.time.OffsetDateTime of( 101 java.time.LocalDate date, java.time.LocalTime time, java.time.ZoneOffset offset) { 102 throw new RuntimeException("Stub!"); 103 } 104 of( java.time.LocalDateTime dateTime, java.time.ZoneOffset offset)105 public static java.time.OffsetDateTime of( 106 java.time.LocalDateTime dateTime, java.time.ZoneOffset offset) { 107 throw new RuntimeException("Stub!"); 108 } 109 of( int year, int month, int dayOfMonth, int hour, int minute, int second, int nanoOfSecond, java.time.ZoneOffset offset)110 public static java.time.OffsetDateTime of( 111 int year, 112 int month, 113 int dayOfMonth, 114 int hour, 115 int minute, 116 int second, 117 int nanoOfSecond, 118 java.time.ZoneOffset offset) { 119 throw new RuntimeException("Stub!"); 120 } 121 ofInstant( java.time.Instant instant, java.time.ZoneId zone)122 public static java.time.OffsetDateTime ofInstant( 123 java.time.Instant instant, java.time.ZoneId zone) { 124 throw new RuntimeException("Stub!"); 125 } 126 from(java.time.temporal.TemporalAccessor temporal)127 public static java.time.OffsetDateTime from(java.time.temporal.TemporalAccessor temporal) { 128 throw new RuntimeException("Stub!"); 129 } 130 parse(java.lang.CharSequence text)131 public static java.time.OffsetDateTime parse(java.lang.CharSequence text) { 132 throw new RuntimeException("Stub!"); 133 } 134 parse( java.lang.CharSequence text, java.time.format.DateTimeFormatter formatter)135 public static java.time.OffsetDateTime parse( 136 java.lang.CharSequence text, java.time.format.DateTimeFormatter formatter) { 137 throw new RuntimeException("Stub!"); 138 } 139 with( java.time.LocalDateTime dateTime, java.time.ZoneOffset offset)140 private java.time.OffsetDateTime with( 141 java.time.LocalDateTime dateTime, java.time.ZoneOffset offset) { 142 throw new RuntimeException("Stub!"); 143 } 144 isSupported(java.time.temporal.TemporalField field)145 public boolean isSupported(java.time.temporal.TemporalField field) { 146 throw new RuntimeException("Stub!"); 147 } 148 isSupported(java.time.temporal.TemporalUnit unit)149 public boolean isSupported(java.time.temporal.TemporalUnit unit) { 150 throw new RuntimeException("Stub!"); 151 } 152 range(java.time.temporal.TemporalField field)153 public java.time.temporal.ValueRange range(java.time.temporal.TemporalField field) { 154 throw new RuntimeException("Stub!"); 155 } 156 get(java.time.temporal.TemporalField field)157 public int get(java.time.temporal.TemporalField field) { 158 throw new RuntimeException("Stub!"); 159 } 160 getLong(java.time.temporal.TemporalField field)161 public long getLong(java.time.temporal.TemporalField field) { 162 throw new RuntimeException("Stub!"); 163 } 164 getOffset()165 public java.time.ZoneOffset getOffset() { 166 throw new RuntimeException("Stub!"); 167 } 168 withOffsetSameLocal(java.time.ZoneOffset offset)169 public java.time.OffsetDateTime withOffsetSameLocal(java.time.ZoneOffset offset) { 170 throw new RuntimeException("Stub!"); 171 } 172 withOffsetSameInstant(java.time.ZoneOffset offset)173 public java.time.OffsetDateTime withOffsetSameInstant(java.time.ZoneOffset offset) { 174 throw new RuntimeException("Stub!"); 175 } 176 toLocalDateTime()177 public java.time.LocalDateTime toLocalDateTime() { 178 throw new RuntimeException("Stub!"); 179 } 180 toLocalDate()181 public java.time.LocalDate toLocalDate() { 182 throw new RuntimeException("Stub!"); 183 } 184 getYear()185 public int getYear() { 186 throw new RuntimeException("Stub!"); 187 } 188 getMonthValue()189 public int getMonthValue() { 190 throw new RuntimeException("Stub!"); 191 } 192 getMonth()193 public java.time.Month getMonth() { 194 throw new RuntimeException("Stub!"); 195 } 196 getDayOfMonth()197 public int getDayOfMonth() { 198 throw new RuntimeException("Stub!"); 199 } 200 getDayOfYear()201 public int getDayOfYear() { 202 throw new RuntimeException("Stub!"); 203 } 204 getDayOfWeek()205 public java.time.DayOfWeek getDayOfWeek() { 206 throw new RuntimeException("Stub!"); 207 } 208 toLocalTime()209 public java.time.LocalTime toLocalTime() { 210 throw new RuntimeException("Stub!"); 211 } 212 getHour()213 public int getHour() { 214 throw new RuntimeException("Stub!"); 215 } 216 getMinute()217 public int getMinute() { 218 throw new RuntimeException("Stub!"); 219 } 220 getSecond()221 public int getSecond() { 222 throw new RuntimeException("Stub!"); 223 } 224 getNano()225 public int getNano() { 226 throw new RuntimeException("Stub!"); 227 } 228 with(java.time.temporal.TemporalAdjuster adjuster)229 public java.time.OffsetDateTime with(java.time.temporal.TemporalAdjuster adjuster) { 230 throw new RuntimeException("Stub!"); 231 } 232 with(java.time.temporal.TemporalField field, long newValue)233 public java.time.OffsetDateTime with(java.time.temporal.TemporalField field, long newValue) { 234 throw new RuntimeException("Stub!"); 235 } 236 withYear(int year)237 public java.time.OffsetDateTime withYear(int year) { 238 throw new RuntimeException("Stub!"); 239 } 240 withMonth(int month)241 public java.time.OffsetDateTime withMonth(int month) { 242 throw new RuntimeException("Stub!"); 243 } 244 withDayOfMonth(int dayOfMonth)245 public java.time.OffsetDateTime withDayOfMonth(int dayOfMonth) { 246 throw new RuntimeException("Stub!"); 247 } 248 withDayOfYear(int dayOfYear)249 public java.time.OffsetDateTime withDayOfYear(int dayOfYear) { 250 throw new RuntimeException("Stub!"); 251 } 252 withHour(int hour)253 public java.time.OffsetDateTime withHour(int hour) { 254 throw new RuntimeException("Stub!"); 255 } 256 withMinute(int minute)257 public java.time.OffsetDateTime withMinute(int minute) { 258 throw new RuntimeException("Stub!"); 259 } 260 withSecond(int second)261 public java.time.OffsetDateTime withSecond(int second) { 262 throw new RuntimeException("Stub!"); 263 } 264 withNano(int nanoOfSecond)265 public java.time.OffsetDateTime withNano(int nanoOfSecond) { 266 throw new RuntimeException("Stub!"); 267 } 268 truncatedTo(java.time.temporal.TemporalUnit unit)269 public java.time.OffsetDateTime truncatedTo(java.time.temporal.TemporalUnit unit) { 270 throw new RuntimeException("Stub!"); 271 } 272 plus(java.time.temporal.TemporalAmount amountToAdd)273 public java.time.OffsetDateTime plus(java.time.temporal.TemporalAmount amountToAdd) { 274 throw new RuntimeException("Stub!"); 275 } 276 plus(long amountToAdd, java.time.temporal.TemporalUnit unit)277 public java.time.OffsetDateTime plus(long amountToAdd, java.time.temporal.TemporalUnit unit) { 278 throw new RuntimeException("Stub!"); 279 } 280 plusYears(long years)281 public java.time.OffsetDateTime plusYears(long years) { 282 throw new RuntimeException("Stub!"); 283 } 284 plusMonths(long months)285 public java.time.OffsetDateTime plusMonths(long months) { 286 throw new RuntimeException("Stub!"); 287 } 288 plusWeeks(long weeks)289 public java.time.OffsetDateTime plusWeeks(long weeks) { 290 throw new RuntimeException("Stub!"); 291 } 292 plusDays(long days)293 public java.time.OffsetDateTime plusDays(long days) { 294 throw new RuntimeException("Stub!"); 295 } 296 plusHours(long hours)297 public java.time.OffsetDateTime plusHours(long hours) { 298 throw new RuntimeException("Stub!"); 299 } 300 plusMinutes(long minutes)301 public java.time.OffsetDateTime plusMinutes(long minutes) { 302 throw new RuntimeException("Stub!"); 303 } 304 plusSeconds(long seconds)305 public java.time.OffsetDateTime plusSeconds(long seconds) { 306 throw new RuntimeException("Stub!"); 307 } 308 plusNanos(long nanos)309 public java.time.OffsetDateTime plusNanos(long nanos) { 310 throw new RuntimeException("Stub!"); 311 } 312 minus(java.time.temporal.TemporalAmount amountToSubtract)313 public java.time.OffsetDateTime minus(java.time.temporal.TemporalAmount amountToSubtract) { 314 throw new RuntimeException("Stub!"); 315 } 316 minus( long amountToSubtract, java.time.temporal.TemporalUnit unit)317 public java.time.OffsetDateTime minus( 318 long amountToSubtract, java.time.temporal.TemporalUnit unit) { 319 throw new RuntimeException("Stub!"); 320 } 321 minusYears(long years)322 public java.time.OffsetDateTime minusYears(long years) { 323 throw new RuntimeException("Stub!"); 324 } 325 minusMonths(long months)326 public java.time.OffsetDateTime minusMonths(long months) { 327 throw new RuntimeException("Stub!"); 328 } 329 minusWeeks(long weeks)330 public java.time.OffsetDateTime minusWeeks(long weeks) { 331 throw new RuntimeException("Stub!"); 332 } 333 minusDays(long days)334 public java.time.OffsetDateTime minusDays(long days) { 335 throw new RuntimeException("Stub!"); 336 } 337 minusHours(long hours)338 public java.time.OffsetDateTime minusHours(long hours) { 339 throw new RuntimeException("Stub!"); 340 } 341 minusMinutes(long minutes)342 public java.time.OffsetDateTime minusMinutes(long minutes) { 343 throw new RuntimeException("Stub!"); 344 } 345 minusSeconds(long seconds)346 public java.time.OffsetDateTime minusSeconds(long seconds) { 347 throw new RuntimeException("Stub!"); 348 } 349 minusNanos(long nanos)350 public java.time.OffsetDateTime minusNanos(long nanos) { 351 throw new RuntimeException("Stub!"); 352 } 353 query(java.time.temporal.TemporalQuery<R> query)354 public <R> R query(java.time.temporal.TemporalQuery<R> query) { 355 throw new RuntimeException("Stub!"); 356 } 357 adjustInto(java.time.temporal.Temporal temporal)358 public java.time.temporal.Temporal adjustInto(java.time.temporal.Temporal temporal) { 359 throw new RuntimeException("Stub!"); 360 } 361 until( java.time.temporal.Temporal endExclusive, java.time.temporal.TemporalUnit unit)362 public long until( 363 java.time.temporal.Temporal endExclusive, java.time.temporal.TemporalUnit unit) { 364 throw new RuntimeException("Stub!"); 365 } 366 format(java.time.format.DateTimeFormatter formatter)367 public java.lang.String format(java.time.format.DateTimeFormatter formatter) { 368 throw new RuntimeException("Stub!"); 369 } 370 atZoneSameInstant(java.time.ZoneId zone)371 public java.time.ZonedDateTime atZoneSameInstant(java.time.ZoneId zone) { 372 throw new RuntimeException("Stub!"); 373 } 374 atZoneSimilarLocal(java.time.ZoneId zone)375 public java.time.ZonedDateTime atZoneSimilarLocal(java.time.ZoneId zone) { 376 throw new RuntimeException("Stub!"); 377 } 378 toOffsetTime()379 public java.time.OffsetTime toOffsetTime() { 380 throw new RuntimeException("Stub!"); 381 } 382 toZonedDateTime()383 public java.time.ZonedDateTime toZonedDateTime() { 384 throw new RuntimeException("Stub!"); 385 } 386 toInstant()387 public java.time.Instant toInstant() { 388 throw new RuntimeException("Stub!"); 389 } 390 toEpochSecond()391 public long toEpochSecond() { 392 throw new RuntimeException("Stub!"); 393 } 394 compareTo(java.time.OffsetDateTime other)395 public int compareTo(java.time.OffsetDateTime other) { 396 throw new RuntimeException("Stub!"); 397 } 398 isAfter(java.time.OffsetDateTime other)399 public boolean isAfter(java.time.OffsetDateTime other) { 400 throw new RuntimeException("Stub!"); 401 } 402 isBefore(java.time.OffsetDateTime other)403 public boolean isBefore(java.time.OffsetDateTime other) { 404 throw new RuntimeException("Stub!"); 405 } 406 isEqual(java.time.OffsetDateTime other)407 public boolean isEqual(java.time.OffsetDateTime other) { 408 throw new RuntimeException("Stub!"); 409 } 410 equals(java.lang.Object obj)411 public boolean equals(java.lang.Object obj) { 412 throw new RuntimeException("Stub!"); 413 } 414 hashCode()415 public int hashCode() { 416 throw new RuntimeException("Stub!"); 417 } 418 toString()419 public java.lang.String toString() { 420 throw new RuntimeException("Stub!"); 421 } 422 writeReplace()423 private java.lang.Object writeReplace() { 424 throw new RuntimeException("Stub!"); 425 } 426 readObject(java.io.ObjectInputStream s)427 private void readObject(java.io.ObjectInputStream s) throws java.io.InvalidObjectException { 428 throw new RuntimeException("Stub!"); 429 } 430 writeExternal(java.io.ObjectOutput out)431 void writeExternal(java.io.ObjectOutput out) throws java.io.IOException { 432 throw new RuntimeException("Stub!"); 433 } 434 readExternal(java.io.ObjectInput in)435 static java.time.OffsetDateTime readExternal(java.io.ObjectInput in) 436 throws java.lang.ClassNotFoundException, java.io.IOException { 437 throw new RuntimeException("Stub!"); 438 } 439 440 public static final java.time.OffsetDateTime MAX; 441 442 static { 443 MAX = null; 444 } 445 446 public static final java.time.OffsetDateTime MIN; 447 448 static { 449 MIN = null; 450 } 451 452 private final java.time.LocalDateTime dateTime; 453 454 { 455 dateTime = null; 456 } 457 458 private final java.time.ZoneOffset offset; 459 460 { 461 offset = null; 462 } 463 464 private static final long serialVersionUID = 2287754244819255394L; // 0x1fbfbc5d57d80062L 465 } 466