1 /* 2 * Copyright (C) 2014 The Android Open Source Project 3 * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. 4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5 * 6 * This code is free software; you can redistribute it and/or modify it 7 * under the terms of the GNU General Public License version 2 only, as 8 * published by the Free Software Foundation. Oracle designates this 9 * particular file as subject to the "Classpath" exception as provided 10 * by Oracle in the LICENSE file that accompanied this code. 11 * 12 * This code is distributed in the hope that it will be useful, but WITHOUT 13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 * version 2 for more details (a copy is included in the LICENSE file that 16 * accompanied this code). 17 * 18 * You should have received a copy of the GNU General Public License version 19 * 2 along with this work; if not, write to the Free Software Foundation, 20 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 21 * 22 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 23 * or visit www.oracle.com if you need additional information or have any 24 * questions. 25 */ 26 27 package sun.util.calendar; 28 29 30 @SuppressWarnings({"unchecked", "deprecation", "all"}) 31 public abstract class CalendarSystem { 32 CalendarSystem()33 public CalendarSystem() { 34 throw new RuntimeException("Stub!"); 35 } 36 37 @dalvik.annotation.compat.UnsupportedAppUsage getGregorianCalendar()38 public static sun.util.calendar.Gregorian getGregorianCalendar() { 39 throw new RuntimeException("Stub!"); 40 } 41 42 @dalvik.annotation.compat.UnsupportedAppUsage forName(java.lang.String calendarName)43 public static sun.util.calendar.CalendarSystem forName(java.lang.String calendarName) { 44 throw new RuntimeException("Stub!"); 45 } 46 getCalendarProperties()47 public static java.util.Properties getCalendarProperties() throws java.io.IOException { 48 throw new RuntimeException("Stub!"); 49 } 50 getName()51 public abstract java.lang.String getName(); 52 getCalendarDate()53 public abstract sun.util.calendar.CalendarDate getCalendarDate(); 54 getCalendarDate(long millis)55 public abstract sun.util.calendar.CalendarDate getCalendarDate(long millis); 56 getCalendarDate( long millis, sun.util.calendar.CalendarDate date)57 public abstract sun.util.calendar.CalendarDate getCalendarDate( 58 long millis, sun.util.calendar.CalendarDate date); 59 getCalendarDate( long millis, java.util.TimeZone zone)60 public abstract sun.util.calendar.CalendarDate getCalendarDate( 61 long millis, java.util.TimeZone zone); 62 newCalendarDate()63 public abstract sun.util.calendar.CalendarDate newCalendarDate(); 64 65 @dalvik.annotation.compat.UnsupportedAppUsage newCalendarDate(java.util.TimeZone zone)66 public abstract sun.util.calendar.CalendarDate newCalendarDate(java.util.TimeZone zone); 67 68 @dalvik.annotation.compat.UnsupportedAppUsage getTime(sun.util.calendar.CalendarDate date)69 public abstract long getTime(sun.util.calendar.CalendarDate date); 70 getYearLength(sun.util.calendar.CalendarDate date)71 public abstract int getYearLength(sun.util.calendar.CalendarDate date); 72 getYearLengthInMonths(sun.util.calendar.CalendarDate date)73 public abstract int getYearLengthInMonths(sun.util.calendar.CalendarDate date); 74 getMonthLength(sun.util.calendar.CalendarDate date)75 public abstract int getMonthLength(sun.util.calendar.CalendarDate date); 76 getWeekLength()77 public abstract int getWeekLength(); 78 getEra(java.lang.String eraName)79 public abstract sun.util.calendar.Era getEra(java.lang.String eraName); 80 getEras()81 public abstract sun.util.calendar.Era[] getEras(); 82 setEra(sun.util.calendar.CalendarDate date, java.lang.String eraName)83 public abstract void setEra(sun.util.calendar.CalendarDate date, java.lang.String eraName); 84 getNthDayOfWeek( int nth, int dayOfWeek, sun.util.calendar.CalendarDate date)85 public abstract sun.util.calendar.CalendarDate getNthDayOfWeek( 86 int nth, int dayOfWeek, sun.util.calendar.CalendarDate date); 87 setTimeOfDay( sun.util.calendar.CalendarDate date, int timeOfDay)88 public abstract sun.util.calendar.CalendarDate setTimeOfDay( 89 sun.util.calendar.CalendarDate date, int timeOfDay); 90 91 @dalvik.annotation.compat.UnsupportedAppUsage validate(sun.util.calendar.CalendarDate date)92 public abstract boolean validate(sun.util.calendar.CalendarDate date); 93 normalize(sun.util.calendar.CalendarDate date)94 public abstract boolean normalize(sun.util.calendar.CalendarDate date); 95 96 private static final sun.util.calendar.Gregorian GREGORIAN_INSTANCE; 97 98 static { 99 GREGORIAN_INSTANCE = null; 100 } 101 102 private static final java.util.concurrent.ConcurrentMap< 103 java.lang.String, sun.util.calendar.CalendarSystem> 104 calendars; 105 106 static { 107 calendars = null; 108 } 109 110 private static final java.util.Map<java.lang.String, java.lang.Class<?>> names; 111 112 static { 113 names = null; 114 } 115 } 116