亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? city.java

?? google android code package
?? JAVA
字號:
/* * Copyright (C) 2007 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * *      http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */package com.android.globaltime;import java.io.DataInputStream;import java.io.IOException;import java.io.InputStream;import java.util.Arrays;import java.util.Comparator;import java.util.HashMap;import java.util.Iterator;import java.util.Map;import java.util.TimeZone;/** * A class representing a city, with an associated position, time zone name, * and raw offset from UTC. */public  class City implements Comparable<City> {    private static Map<String,City> cities = new HashMap<String,City>();    private static City[] citiesByRawOffset;    private String name;    private String timeZoneID;    private TimeZone timeZone = null;    private int rawOffset;    private float latitude, longitude;    private float x, y, z;        /**     * Loads the city database.  The cities must be stored in order by raw     * offset from UTC.     */    public static void loadCities(InputStream is) throws IOException {        DataInputStream dis = new DataInputStream(is);        int numCities = dis.readInt();        citiesByRawOffset = new City[numCities];        byte[] buf = new byte[24];        for (int i = 0; i < numCities; i++) {            String name = dis.readUTF();            String tzid = dis.readUTF();            dis.read(buf);  //          The code below is a faster version of:            //          int rawOffset = dis.readInt();//          float latitude = dis.readFloat();//          float longitude = dis.readFloat();//          float cx = dis.readFloat();//          float cy = dis.readFloat();//          float cz = dis.readFloat();            int rawOffset =                       (buf[ 0] << 24) |       ((buf[ 1] & 0xff) << 16) |                      ((buf[ 2] & 0xff) << 8) | (buf[ 3] & 0xff);            int ilat = (buf[ 4] << 24) |       ((buf[ 5] & 0xff) << 16) |                      ((buf[ 6] & 0xff) << 8) | (buf[ 7] & 0xff);            int ilon = (buf[ 8] << 24) |       ((buf[ 9] & 0xff) << 16) |                      ((buf[10] & 0xff) << 8) | (buf[11] & 0xff);            int icx =  (buf[12] << 24) |       ((buf[13] & 0xff) << 16) |                      ((buf[14] & 0xff) << 8) | (buf[15] & 0xff);            int icy =  (buf[16] << 24) |       ((buf[17] & 0xff) << 16) |                      ((buf[18] & 0xff) << 8) | (buf[19] & 0xff);            int icz =  (buf[20] << 24) |       ((buf[21] & 0xff) << 16) |                      ((buf[22] & 0xff) << 8) | (buf[23] & 0xff);            float latitude = Float.intBitsToFloat(ilat);            float longitude = Float.intBitsToFloat(ilon);            float cx = Float.intBitsToFloat(icx);            float cy = Float.intBitsToFloat(icy);            float cz = Float.intBitsToFloat(icz);            City city = new City(name, tzid, rawOffset,                                 latitude, longitude, cx, cy, cz);            cities.put(name, city);            citiesByRawOffset[i] = city;        }    }        /**     * Returns the cities, ordered by name.     */    public static City[] getCitiesByName() {        City[] ocities = new City[cities.size()];        Iterator<City> iter = cities.values().iterator();        int idx = 0;        while (iter.hasNext()) {            ocities[idx++] = iter.next();        }        Arrays.sort(ocities);        return ocities;    }        /**     * Returns the cities, ordered by offset, accounting for summer/daylight     * savings time.  This requires reading the entire time zone database     * behind the scenes.     */    public static City[] getCitiesByOffset() {        City[] ocities = new City[cities.size()];        Iterator<City> iter = cities.values().iterator();        int idx = 0;        while (iter.hasNext()) {            ocities[idx++] = iter.next();        }        Arrays.sort(ocities, new Comparator() {                public int compare(Object o1, Object o2) {                    long now = System.currentTimeMillis();                    City c1 = (City)o1;                    City c2 = (City)o2;                    TimeZone tz1 = c1.getTimeZone();                    TimeZone tz2 = c2.getTimeZone();                    int off1 = tz1.getOffset(now);                    int off2 = tz2.getOffset(now);                    if (off1 == off2) {                        float dlat = c2.getLatitude() - c1.getLatitude();                        if (dlat < 0.0f) return -1;                        if (dlat > 0.0f) return 1;                        return 0;                    }                    return off1 - off2;                }            });        return ocities;    }            /**     * Returns the cities, ordered by offset, accounting for summer/daylight     * savings time.  This does not require reading the time zone database     * since the cities are pre-sorted.     */    public static City[] getCitiesByRawOffset() {        return citiesByRawOffset;    }        /**     * Returns an Iterator over all cities, in raw offset order.     */    public static Iterator<City> iterator() {        return cities.values().iterator();    }        /**     * Returns the total number of cities.     */    public static int numCities() {        return cities.size();    }        /**     * Constructs a city with the given name, time zone name, raw offset,     * latitude, longitude, and 3D (X, Y, Z) coordinate.     */    public City(String name, String timeZoneID,                int rawOffset,                float latitude, float longitude,                float x, float y, float z) {        this.name = name;        this.timeZoneID = timeZoneID;        this.rawOffset = rawOffset;        this.latitude = latitude;        this.longitude = longitude;        this.x = x;        this.y = y;        this.z = z;    }        public String getName() {        return name;    }        public TimeZone getTimeZone() {        if (timeZone == null) {            timeZone = TimeZone.getTimeZone(timeZoneID);        }        return timeZone;    }        public float getLongitude() {        return longitude;    }        public float getLatitude() {        return latitude;    }        public float getX() {        return x;    }        public float getY() {        return y;    }        public float getZ() {        return z;    }        public float getRawOffset() {        return rawOffset / 3600000.0f;    }    public int getRawOffsetMillis() {        return rawOffset;    }        /**     * Returns this city's offset from UTC, taking summer/daylight savigns     * time into account.     */    public float getOffset() {        long now = System.currentTimeMillis();        if (timeZone == null) {            timeZone = TimeZone.getTimeZone(timeZoneID);        }        return timeZone.getOffset(now) / 3600000.0f;    }        /**     * Compares this city to another by name.     */    public int compareTo(City o) {        return name.compareTo(o.name);    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美videossexotv100| 欧美变态tickle挠乳网站| 麻豆一区二区三| 国产欧美1区2区3区| 欧美精品乱码久久久久久按摩 | 久久精品水蜜桃av综合天堂| 色婷婷激情一区二区三区| 久久国产福利国产秒拍| 一级精品视频在线观看宜春院| 精品国产凹凸成av人导航| 色婷婷综合激情| 国产精品一区二区在线观看网站 | 欧美一级二级在线观看| 色综合久久久久综合体桃花网| 国产主播一区二区| 蜜桃久久久久久| 亚洲成在线观看| 成人欧美一区二区三区| 国产亚洲欧美一区在线观看| 欧美一区二区三区免费观看视频| 91婷婷韩国欧美一区二区| 国产精品一二三四五| 久久99日本精品| 午夜视黄欧洲亚洲| 亚洲人午夜精品天堂一二香蕉| 国产亚洲精品福利| 2020国产精品久久精品美国| 91精品福利在线一区二区三区 | 成人久久久精品乱码一区二区三区| 麻豆精品视频在线| 日本在线不卡视频一二三区| 亚洲午夜一二三区视频| 亚洲精品欧美专区| 国产精品第一页第二页第三页| 国产欧美日韩综合精品一区二区| 26uuu久久天堂性欧美| 精品国产99国产精品| 日韩一区二区三区三四区视频在线观看| 欧美日免费三级在线| 欧美性大战久久| 欧美日韩另类一区| 欧美日本国产视频| 欧美一级夜夜爽| 欧美一区二区三区色| 日韩欧美成人激情| 欧美成人精品高清在线播放| 精品久久五月天| 久久婷婷国产综合精品青草| 久久综合色鬼综合色| 久久免费看少妇高潮| 国产亚洲精品aa午夜观看| 日本一区二区三区四区| 国产精品视频一区二区三区不卡| 国产精品国产三级国产专播品爱网| 最近日韩中文字幕| 一级日本不卡的影视| 午夜不卡av在线| 免费在线一区观看| 国产麻豆日韩欧美久久| 夫妻av一区二区| 91在线观看一区二区| 欧美亚洲国产bt| 日韩视频国产视频| 久久美女高清视频 | 日韩高清在线观看| 国产永久精品大片wwwapp| 成人av网址在线| 色悠悠亚洲一区二区| 欧美久久一区二区| 久久久久久久精| 综合分类小说区另类春色亚洲小说欧美| 亚洲另类在线制服丝袜| 日韩精品欧美精品| 国产精品自拍在线| 欧美伊人久久大香线蕉综合69| 91麻豆精品国产自产在线| 久久精品无码一区二区三区| 一区二区三区中文字幕| 日韩av网站在线观看| 国产99久久久精品| 欧美日韩亚洲综合在线 | 免费人成精品欧美精品| 国产精品 欧美精品| 色哟哟一区二区在线观看| 7777女厕盗摄久久久| 国产精品婷婷午夜在线观看| 亚洲一区二区三区视频在线| 久久爱www久久做| 色吧成人激情小说| 欧美变态凌虐bdsm| 中文字幕色av一区二区三区| 亚洲成人免费视频| 欧美一级片免费看| 中文字幕一区二区三区在线播放| 婷婷成人综合网| 成人动漫av在线| 欧美大尺度电影在线| 亚洲免费在线视频| 国产福利电影一区二区三区| 欧美三级资源在线| 国产精品久久看| 久久国产福利国产秒拍| 欧美午夜视频网站| 中文字幕在线不卡视频| 美女被吸乳得到大胸91| 色中色一区二区| 国产午夜三级一区二区三| 丝袜脚交一区二区| 91免费国产视频网站| 国产午夜亚洲精品不卡| 免费观看91视频大全| 欧美中文字幕一二三区视频| 国产精品久久久久永久免费观看 | 91精品国产黑色紧身裤美女| 亚洲日本青草视频在线怡红院 | 亚洲婷婷综合色高清在线| 国产在线乱码一区二区三区| 欧美日韩美少妇| 亚洲一区二区三区免费视频| 91一区二区在线观看| 欧美国产禁国产网站cc| 捆绑调教美女网站视频一区| 欧美日韩国产免费一区二区 | 亚洲1区2区3区4区| 在线观看国产日韩| 最新久久zyz资源站| 成人午夜视频在线| 国产精品丝袜91| 国产清纯白嫩初高生在线观看91| 精品一区二区三区av| 51精品久久久久久久蜜臀| 午夜av区久久| 欧美日韩www| 亚洲成人av一区| 在线观看亚洲a| 亚洲综合在线免费观看| 欧美在线观看视频一区二区| 亚洲欧美日韩国产一区二区三区| 不卡视频一二三四| 国产精品乱人伦| 成人av集中营| 成人欧美一区二区三区在线播放| 99re这里都是精品| 亚洲精品国产精品乱码不99 | 国产高清在线精品| 国产欧美日韩综合精品一区二区| 国产999精品久久久久久绿帽| 欧美国产视频在线| av资源网一区| 亚洲精品五月天| 欧美午夜一区二区| 蜜桃久久久久久| 国产网站一区二区| 91视频观看视频| 夜夜精品视频一区二区| 欧美日本国产视频| 卡一卡二国产精品| 国产三级欧美三级| 91视频91自| 亚洲成a人片在线不卡一二三区| 欧美福利电影网| 国产毛片精品一区| 亚洲激情校园春色| 在线播放中文一区| 国产一区二区免费看| 国产精品传媒入口麻豆| 欧美三片在线视频观看 | 国产成人av影院| 日韩理论片在线| 51精品秘密在线观看| 国产麻豆精品theporn| 亚洲精品一二三区| 91精品国产入口| 国产成人午夜精品影院观看视频| 日韩理论片在线| 欧美一区2区视频在线观看| 国产精品亚洲综合一区在线观看| 亚洲日穴在线视频| 欧美成人欧美edvon| 99国产精品国产精品毛片| 日韩福利视频导航| 亚洲欧洲性图库| 欧美一区二区三区视频免费| 成人福利视频网站| 午夜影视日本亚洲欧洲精品| 久久久亚洲高清| 欧美美女视频在线观看| 大胆欧美人体老妇| 日韩av中文字幕一区二区| 亚洲欧洲精品一区二区三区| 欧美一个色资源| 91在线观看污| 国产精品资源站在线| 亚洲aaa精品| 国产精品久久久久影院亚瑟| 精品国产成人在线影院| 欧美日韩成人一区二区| 91影院在线观看| 国产成人av影院| 久久97超碰色|