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

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

?? decimallocaleconverter.java

?? 這是一個有關common beanutils 的源碼
?? JAVA
字號:
/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You 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 org.apache.commons.beanutils.locale.converters;

import org.apache.commons.beanutils.locale.BaseLocaleConverter;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import java.text.DecimalFormat;
import java.text.ParseException;
import java.util.Locale;


/**
 * <p>Standard {@link org.apache.commons.beanutils.locale.LocaleConverter} 
 * implementation that converts an incoming
 * locale-sensitive String into a <code>java.lang.Number</code> object,
 * optionally using a default value or throwing a 
 * {@link org.apache.commons.beanutils.ConversionException}
 * if a conversion error occurs.</p>
 *
 * @author Yauheny Mikulski
 * @author Yoav Shapira
 * @since 1.7
 */

public class DecimalLocaleConverter extends BaseLocaleConverter {


    // ----------------------------------------------------- Instance Variables

    /** All logging goes through this logger */
    private Log log = LogFactory.getLog(DecimalLocaleConverter.class);     

    // ----------------------------------------------------------- Constructors

    /**
     * Create a {@link org.apache.commons.beanutils.locale.LocaleConverter} 
     * that will throw a {@link org.apache.commons.beanutils.ConversionException}
     * if a conversion error occurs. The locale is the default locale for
     * this instance of the Java Virtual Machine and an unlocalized pattern is used
     * for the convertion.
     *
     */
    public DecimalLocaleConverter() {

        this(false);
    }

    /**
     * Create a {@link org.apache.commons.beanutils.locale.LocaleConverter} 
     * that will throw a {@link org.apache.commons.beanutils.ConversionException}
     * if a conversion error occurs. The locale is the default locale for
     * this instance of the Java Virtual Machine.
     *
     * @param locPattern    Indicate whether the pattern is localized or not
     */
    public DecimalLocaleConverter(boolean locPattern) {

        this(Locale.getDefault(), locPattern);
    }

    /**
     * Create a {@link org.apache.commons.beanutils.locale.LocaleConverter} 
     * that will throw a {@link org.apache.commons.beanutils.ConversionException}
     * if a conversion error occurs. An unlocalized pattern is used for the convertion.
     *
     * @param locale        The locale
     */
    public DecimalLocaleConverter(Locale locale) {

        this(locale, false);
    }

    /**
     * Create a {@link org.apache.commons.beanutils.locale.LocaleConverter} 
     * that will throw a {@link org.apache.commons.beanutils.ConversionException}
     * if a conversion error occurs.
     *
     * @param locale        The locale
     * @param locPattern    Indicate whether the pattern is localized or not
     */
    public DecimalLocaleConverter(Locale locale, boolean locPattern) {

        this(locale, (String) null, locPattern);
    }

    /**
     * Create a {@link org.apache.commons.beanutils.locale.LocaleConverter} 
     * that will throw a {@link org.apache.commons.beanutils.ConversionException}
     * if a conversion error occurs. An unlocalized pattern is used for the convertion.
     *
     * @param locale        The locale
     * @param pattern       The convertion pattern
     */
    public DecimalLocaleConverter(Locale locale, String pattern) {

        this(locale, pattern, false);
    }

    /**
     * Create a {@link org.apache.commons.beanutils.locale.LocaleConverter} 
     * that will throw a {@link org.apache.commons.beanutils.ConversionException}
     * if a conversion error occurs.
     *
     * @param locale        The locale
     * @param pattern       The convertion pattern
     * @param locPattern    Indicate whether the pattern is localized or not
     */
    public DecimalLocaleConverter(Locale locale, String pattern, boolean locPattern) {

        super(locale, pattern, locPattern);
    }

    /**
     * Create a {@link org.apache.commons.beanutils.locale.LocaleConverter} 
     * that will return the specified default value
     * if a conversion error occurs. The locale is the default locale for
     * this instance of the Java Virtual Machine and an unlocalized pattern is used
     * for the convertion.
     *
     * @param defaultValue  The default value to be returned
     */
    public DecimalLocaleConverter(Object defaultValue) {

        this(defaultValue, false);
    }

    /**
     * Create a {@link org.apache.commons.beanutils.locale.LocaleConverter} 
     * that will return the specified default value
     * if a conversion error occurs. The locale is the default locale for
     * this instance of the Java Virtual Machine.
     *
     * @param defaultValue  The default value to be returned
     * @param locPattern    Indicate whether the pattern is localized or not
     */
    public DecimalLocaleConverter(Object defaultValue, boolean locPattern) {

        this(defaultValue, Locale.getDefault(), locPattern);
    }

    /**
     * Create a {@link org.apache.commons.beanutils.locale.LocaleConverter} 
     * that will return the specified default value
     * if a conversion error occurs. An unlocalized pattern is used for the convertion.
     *
     * @param defaultValue  The default value to be returned
     * @param locale        The locale
     */
    public DecimalLocaleConverter(Object defaultValue, Locale locale) {

        this(defaultValue, locale, false);
    }

    /**
     * Create a {@link org.apache.commons.beanutils.locale.LocaleConverter} 
     * that will return the specified default value
     * if a conversion error occurs.
     *
     * @param defaultValue  The default value to be returned
     * @param locale        The locale
     * @param locPattern    Indicate whether the pattern is localized or not
     */
    public DecimalLocaleConverter(Object defaultValue, Locale locale, boolean locPattern) {

        this(defaultValue, locale, null, locPattern);
    }

    /**
     * Create a {@link org.apache.commons.beanutils.locale.LocaleConverter} 
     * that will return the specified default value
     * if a conversion error occurs. An unlocalized pattern is used for the convertion.
     *
     * @param defaultValue  The default value to be returned
     * @param locale        The locale
     * @param pattern       The convertion pattern
     */
    public DecimalLocaleConverter(Object defaultValue, Locale locale, String pattern) {

        this(defaultValue, locale, pattern, false);
    }

    /**
     * Create a {@link org.apache.commons.beanutils.locale.LocaleConverter} 
     * that will return the specified default value
     * if a conversion error occurs.
     *
     * @param defaultValue  The default value to be returned
     * @param locale        The locale
     * @param pattern       The convertion pattern
     * @param locPattern    Indicate whether the pattern is localized or not
     */
    public DecimalLocaleConverter(Object defaultValue, Locale locale, String pattern, boolean locPattern) {

        super(defaultValue, locale, pattern, locPattern);

    }

    // --------------------------------------------------------- Methods

    /**
     * Convert the specified locale-sensitive input object into an output 
     * object of the specified type.
     *
     * @param value The input object to be converted
     * @param pattern The pattern is used for the convertion
     * @return The converted value
     *
     * @exception org.apache.commons.beanutils.ConversionException if conversion
     * cannot be performed successfully
     * @throws ParseException if an error occurs parsing a String to a Number
     */
    protected Object parse(Object value, String pattern) throws ParseException {

        if (value instanceof Number) {
            return value;
        }

        // Note that despite the ambiguous "getInstance" name, and despite the
        // fact that objects returned from this method have the same toString
        // representation, each call to getInstance actually returns a new
        // object.
        DecimalFormat formatter = (DecimalFormat) DecimalFormat.getInstance(locale);

        // if some constructors default pattern to null, it makes only sense 
        // to handle null pattern gracefully
        if (pattern != null) {
            if (locPattern) {
                formatter.applyLocalizedPattern(pattern);
            } else {
                formatter.applyPattern(pattern);
            }
        } else {
            log.debug("No pattern provided, using default.");
        }

        return formatter.parse((String) value);
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产精品久久人人爱蜜臀| 94-欧美-setu| 久久99热国产| 蜜桃av一区二区在线观看 | 亚洲妇女屁股眼交7| 亚洲综合激情另类小说区| 一区二区三区在线观看网站| 一区二区三区毛片| 亚洲精品成人少妇| 午夜精品久久久久影视| 日本欧美加勒比视频| 久久se精品一区精品二区| 国内久久精品视频| 国产精品 日产精品 欧美精品| 国产成人啪午夜精品网站男同| 成人av在线一区二区三区| 99久久精品情趣| 91九色最新地址| 69久久99精品久久久久婷婷| 日韩一区二区三区av| 久久综合九色综合欧美就去吻| 国产午夜精品久久久久久久 | 亚洲成人综合在线| 日韩av高清在线观看| 久久国产婷婷国产香蕉| 国产一区二区按摩在线观看| 岛国一区二区在线观看| 色香蕉成人二区免费| 欧美日韩国产在线播放网站| 日韩一二三区不卡| 国产精品美女久久久久av爽李琼 | 老司机精品视频导航| 国产精品一区三区| 色综合天天综合狠狠| 欧美丰满嫩嫩电影| 久久久久9999亚洲精品| 亚洲欧美一区二区三区极速播放| 亚洲成人动漫在线观看| 国产一区二区三区在线观看免费| 99久久99精品久久久久久| 欧美亚洲国产一区在线观看网站| 日韩免费一区二区三区在线播放| 欧美国产精品一区二区| 一二三区精品福利视频| 裸体歌舞表演一区二区| 亚洲黄网站在线观看| 麻豆精品在线播放| 91欧美激情一区二区三区成人| 欧美无乱码久久久免费午夜一区| 久久亚洲欧美国产精品乐播| 日韩理论片网站| 久国产精品韩国三级视频| 91亚洲精品乱码久久久久久蜜桃| 日韩一区二区三区电影| 亚洲欧美日韩一区二区 | 国内精品国产三级国产a久久| 成人午夜电影网站| 欧美精品丝袜中出| 中文字幕av在线一区二区三区| 舔着乳尖日韩一区| 不卡视频在线看| 精品久久久久久久人人人人传媒| 亚洲在线免费播放| 成人午夜av在线| 欧美成人三级电影在线| 一区二区在线免费| 成人av综合一区| 精品日韩一区二区三区| 香蕉成人啪国产精品视频综合网| 国产成人自拍高清视频在线免费播放| 欧美日韩三级一区二区| 日韩一区有码在线| 国产河南妇女毛片精品久久久| 欧美久久久久久久久| 亚洲欧美激情小说另类| 成人一道本在线| 精品久久久久久久久久久久久久久久久| 亚洲激情自拍偷拍| av亚洲产国偷v产偷v自拍| 久久午夜国产精品| 青椒成人免费视频| 51精品秘密在线观看| 一区二区三国产精华液| 99久久久国产精品免费蜜臀| 国产日韩影视精品| 国产一区欧美二区| 精品91自产拍在线观看一区| 日日摸夜夜添夜夜添精品视频| 国产精品动漫网站| 国产精品羞羞答答xxdd| 日韩欧美一二三四区| 日本不卡视频一二三区| 8v天堂国产在线一区二区| 亚洲永久免费视频| 在线免费观看日韩欧美| 亚洲人成影院在线观看| 成人av网在线| 国产精品久久久久天堂| 成人99免费视频| 综合av第一页| 99re8在线精品视频免费播放| 国产精品视频第一区| 国产91对白在线观看九色| 亚洲国产精品99久久久久久久久| 国产精品77777| 亚洲国产精品av| fc2成人免费人成在线观看播放 | 日本视频一区二区| 欧美精品一二三| 蜜臀av一区二区| 欧美videos大乳护士334| 黄页视频在线91| 国产三级欧美三级日产三级99 | 欧美日韩在线播放三区四区| 一区二区三区欧美激情| 精品视频一区三区九区| 天天操天天色综合| 日韩视频国产视频| 国产精品资源站在线| 中文字幕一区二区三区四区不卡| 9l国产精品久久久久麻豆| 亚洲精品国产无天堂网2021 | 久久久一区二区| 国产成人午夜电影网| 亚洲色欲色欲www| 欧美日韩精品电影| 精品一区二区三区av| 国产日产欧美精品一区二区三区| 91在线精品一区二区三区| 一区二区三区精品在线| 日韩一区二区三区在线视频| 国产精品18久久久久久久久| 亚洲欧洲综合另类| 日韩一区二区三区高清免费看看| 国产精品一区二区久激情瑜伽| 亚洲欧洲一区二区在线播放| 欧美日韩在线三区| 国产精品资源在线观看| 136国产福利精品导航| 欧美久久久久中文字幕| 国产精品123| 91亚洲永久精品| 午夜精品免费在线| 国产免费观看久久| 欧美日韩中文字幕一区二区| 精品一区二区三区av| 亚洲激情图片一区| 精品国产电影一区二区| 色先锋久久av资源部| 精品一区二区三区久久| 一区二区三区欧美久久| 久久网这里都是精品| 欧美中文字幕亚洲一区二区va在线| 毛片不卡一区二区| 亚洲精品国产a| 精品播放一区二区| 欧美日韩中文字幕一区| 粉嫩一区二区三区性色av| 亚洲成人精品一区| 中文字幕高清一区| 日韩欧美色电影| 色吊一区二区三区| 国产成人在线视频免费播放| 日韩国产一二三区| 亚洲男同性恋视频| 欧美国产日韩a欧美在线观看| 欧美疯狂做受xxxx富婆| 91日韩精品一区| 国产九九视频一区二区三区| 五月婷婷激情综合| 亚洲三级在线播放| 久久综合999| 欧美一区二区三区日韩视频| 91传媒视频在线播放| 国产成人精品免费视频网站| 免费看日韩精品| 香蕉影视欧美成人| 亚洲欧美一区二区三区极速播放 | 国产网站一区二区| 在线播放国产精品二区一二区四区 | 日韩精品乱码av一区二区| 中文字幕一区二区三区色视频| 日韩三级视频在线观看| 欧美日韩免费观看一区三区| 99久久国产综合精品女不卡| 东方aⅴ免费观看久久av| 蜜桃免费网站一区二区三区| 午夜久久久影院| 一区二区三区毛片| 亚洲男人的天堂在线aⅴ视频| 国产精品色哟哟| 久久精品亚洲国产奇米99| 日韩欧美aaaaaa| 日韩三级在线观看| 欧美精品v国产精品v日韩精品 | 日韩一区国产二区欧美三区| 欧美日韩一级视频| 欧美日韩一区二区在线观看| 欧洲av一区二区嗯嗯嗯啊| 色香色香欲天天天影视综合网|