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

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

?? statisticsmanager.java

?? 一個javabean的轉換與copy非常的好用希望大家好好研究一下
?? JAVA
字號:
/*
 * Copyright 2005-2007 the original author or authors.
 *
 * 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 net.sf.dozer.util.mapping.stats;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;

import org.apache.log4j.Logger;

import net.sf.dozer.util.mapping.config.GlobalSettings;
import net.sf.dozer.util.mapping.exception.NotFoundException;

/**
 * @author tierney.matt
*/
public final class StatisticsManager implements StatisticsManagerIF {
  private static final Logger log = Logger.getLogger(StatisticsManager.class);
  private final Map statisticsMap = new HashMap();

  public StatisticsManager() {
  }
  
  public void clearAll() {
    statisticsMap.clear();
  }
  
  public Set getStatisticEntries(String statisticType) {
    return getStatistic(statisticType).getEntries();
  }
  
  public Set getStatistics() {
    return new HashSet(statisticsMap.values());
  }
  
  public boolean isStatisticsEnabled() {
    return GlobalSettings.getInstance().getSettings().isStatisticsEnabled();
  }

  public void setStatisticsEnabled(boolean statisticsEnabled) {
    GlobalSettings.getInstance().getSettings().setStatisticsEnabled(statisticsEnabled);
  }
  
  public Statistic getStatistic(String statisticType) {
    Statistic result = (Statistic) statisticsMap.get(statisticType);
    if (result == null) {
      throw new NotFoundException("Unable to find statistic for type: " + statisticType);
    }
    return result;
  }
  
  public Set getStatisticTypes() {
    Set results = new HashSet();
    Iterator iter = statisticsMap.entrySet().iterator();
    while (iter.hasNext()) {
      Map.Entry entry = (Map.Entry)iter.next();
      results.add((String)entry.getKey());
    }
    return results;
  }

  /*
   * Convenience method that should only be used for statistic types that
   * will only ever have 1 statistic entry(value).  For stats that only have one entry, it 
   * is assumed that the single entrie's key is the same as the stat type name
   */
  public void increment(String statisticType) {
    increment(statisticType, 1);
  }

  public void increment(String statisticType, long value) {
    increment(statisticType, statisticType, value);
  }
  
  public void increment(String statisticType, Object statisticEntryKey) {
    increment(statisticType, statisticEntryKey, 1);
  }
  
  public void increment(String statisticType, Object statisticEntryKey, long value) {
    //If statistics are not enabled, just return and do nothing.
    if (!isStatisticsEnabled()) {
      return;
    }
    
    if (statisticType == null) {
      throw new IllegalArgumentException("statistic type must be specified");
    }
    
    if (statisticEntryKey == null) {
      throw new IllegalArgumentException("statistic entry key must be specified");
    }

    //Get Statistic object for the specified type.  If it doesnt aleady exist, create it
    //synchronized(statistics) {
      Statistic statistic = (Statistic) statisticsMap.get(statisticType);
      if (statistic == null) {
        statistic = new Statistic(statisticType);
        addStatistic(statistic);
      }
    //}
    
    //Get the Statistic Entry object which contains the actual value.  
    //If it doesnt aleady exist, create it so that it can be incremented
    StatisticEntry statisticEntry = null;
    //synchronized(statistic) {
      statisticEntry = statistic.getEntry(statisticEntryKey);
      if(statisticEntry == null) {
        statisticEntry = new StatisticEntry(statisticEntryKey);
        statistic.addEntry(statisticEntry);
      }
    //}
    
    //Increment the actual value
    statisticEntry.increment(value);
  }
  
  /*
   * Convenience method that should only be used for statistic types that
   * will only ever have 1 statistic entry(value).  getStatisticEntries() should 
   * be used for statistic types that have more than 1 statistic entry(value) 
   */
  public long getStatisticValue(String statisticType) {
    Set entries = getStatistic(statisticType).getEntries();
    if (entries.size() > 1) {
      throw new IllegalArgumentException("More than one value entry found for stat type: " + statisticType);
    }
    return ((StatisticEntry)entries.iterator().next()).getValue();
  }

  public void addStatistic(Statistic statistic) {
    if (statisticExists(statistic.getType())) {
      throw new IllegalArgumentException("Statistic already exists for type: " + statistic.getType());
    }
    statisticsMap.put(statistic.getType(), statistic);
  }
  
  public boolean statisticExists(String statisticType) {
    return statisticsMap.containsKey(statisticType);
  }
  
  public void logStatistics() {
    log.info(getStatistics());
  }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美zozo另类异族| 国产欧美一区二区精品性色| 国产不卡一区视频| 激情欧美一区二区| 国产乱子伦视频一区二区三区| 丝袜a∨在线一区二区三区不卡| 香港成人在线视频| 奇米777欧美一区二区| 天天色综合天天| 美女诱惑一区二区| 国产精品18久久久| 成人黄页在线观看| 色噜噜久久综合| 欧美日韩一区二区三区不卡| 欧美日韩亚州综合| 欧美电视剧在线观看完整版| 久久免费视频一区| 最新高清无码专区| 午夜精品久久一牛影视| 免费国产亚洲视频| 成人av网址在线观看| 在线观看日韩高清av| 欧美日韩不卡一区| 国产日韩精品一区二区三区在线| 中文字幕精品一区二区三区精品| 亚洲欧美日韩国产中文在线| 午夜av一区二区三区| 韩国av一区二区| 97精品久久久久中文字幕 | 日韩和欧美一区二区| 日本大胆欧美人术艺术动态| 福利91精品一区二区三区| 欧美三级中文字幕在线观看| 欧美一级电影网站| 亚洲欧美aⅴ...| 九一久久久久久| 99re这里都是精品| 精品99一区二区三区| 亚洲欧美日韩在线不卡| 男女男精品视频| 色婷婷一区二区三区四区| 日韩女同互慰一区二区| 亚洲精品国产a久久久久久| 久久99精品久久久久| 日本乱人伦一区| 国产女主播视频一区二区| 五月婷婷激情综合| 97se亚洲国产综合自在线 | 国产精品一区二区男女羞羞无遮挡| 色综合天天综合网天天看片| 337p粉嫩大胆色噜噜噜噜亚洲| 夜夜亚洲天天久久| 成人综合在线观看| 久久奇米777| 秋霞午夜鲁丝一区二区老狼| 色综合天天综合在线视频| 久久久久九九视频| 麻豆精品久久久| 欧美高清激情brazzers| 一区二区国产盗摄色噜噜| 高清免费成人av| 国产亚洲精品7777| 国产一区二区三区日韩| 制服.丝袜.亚洲.中文.综合| 亚洲综合丝袜美腿| 色综合色综合色综合色综合色综合 | 一区二区三区四区不卡视频 | 一区二区三区免费在线观看| 国产精品18久久久久| 久久久精品国产免费观看同学| 青青草原综合久久大伊人精品优势 | 国产精品久久久久久久久搜平片 | 国产精品进线69影院| 成人黄色大片在线观看| 国产精品视频第一区| 高清shemale亚洲人妖| 久久久国产精品麻豆| 国产精品一二一区| 欧美高清在线一区二区| 成年人国产精品| 亚洲色图都市小说| 一本大道综合伊人精品热热| 亚洲九九爱视频| 欧美亚洲综合色| 日韩电影在线观看网站| 精品国产乱码久久| 国产高清不卡一区| 亚洲欧美综合色| 欧美色图12p| 热久久免费视频| 国产日韩精品一区二区浪潮av| 成人深夜在线观看| 亚洲摸摸操操av| 欧美在线你懂的| 麻豆精品在线观看| 中文字幕在线播放不卡一区| 色成人在线视频| 老司机午夜精品| 国产精品免费看片| 欧美日韩国产综合一区二区| 蜜桃视频第一区免费观看| 国产午夜精品久久久久久久 | 欧美一区二区三区四区在线观看| 亚洲精品videosex极品| 精品国产乱码久久久久久免费| 国产91清纯白嫩初高中在线观看| 亚洲精品中文字幕在线观看| 欧美大尺度电影在线| av在线播放成人| 免费观看91视频大全| 日韩一区中文字幕| 日韩欧美一级二级| 91免费视频观看| 久草精品在线观看| 一区二区激情视频| 国产欧美一区二区在线观看| 欧美日韩亚州综合| eeuss鲁片一区二区三区在线观看| 日韩高清电影一区| 一区二区三区中文字幕电影| 欧美成人一区二区| 欧美日韩国产精品自在自线| 成人av在线看| 国产激情视频一区二区三区欧美| 亚洲成av人影院| 亚洲色欲色欲www| 久久久久国色av免费看影院| 欧美一区二区精品在线| 色噜噜狠狠色综合欧洲selulu| 国产精品亚洲综合一区在线观看| 日韩国产欧美一区二区三区| 亚洲欧美日韩人成在线播放| 国产日产欧美一区二区视频| 精品区一区二区| 日韩欧美亚洲一区二区| 欧美精品色综合| 在线看日本不卡| 日本道色综合久久| 91碰在线视频| 波多野结衣一区二区三区| 国内欧美视频一区二区| 免费欧美日韩国产三级电影| 午夜精品123| 亚洲国产日韩a在线播放| 亚洲欧美色图小说| 亚洲四区在线观看| 国产精品美女久久福利网站| 国产午夜精品美女毛片视频| 久久精品视频一区二区三区| 精品国产污污免费网站入口| 日韩精品一区国产麻豆| 日韩欧美专区在线| 欧美一级淫片007| 精品欧美乱码久久久久久| 精品免费日韩av| 久久综合九色综合久久久精品综合 | 狠狠色2019综合网| 国产一二三精品| 丁香婷婷综合色啪| 91网站最新地址| 欧美中文一区二区三区| 欧美精品在线一区二区| 91精品国产综合久久久久久漫画 | 欧洲精品一区二区三区在线观看| 在线精品亚洲一区二区不卡| 欧美日韩免费电影| 日韩欧美亚洲另类制服综合在线| 精品成人a区在线观看| 久久精品视频免费| 最好看的中文字幕久久| 亚洲国产美女搞黄色| 日韩精品成人一区二区三区| 九九精品视频在线看| 国产成人啪免费观看软件| 91精品1区2区| 日韩女优av电影| 国产精品久久久久久久午夜片| 亚洲一区免费在线观看| 麻豆传媒一区二区三区| av在线不卡免费看| 7777女厕盗摄久久久| 国产欧美日韩卡一| 午夜av一区二区三区| 国产成人在线视频网站| 欧美综合一区二区三区| 26uuu久久综合| 一区二区三区不卡视频| 激情av综合网| 欧洲亚洲精品在线| 中日韩免费视频中文字幕| 无码av免费一区二区三区试看 | 2023国产精华国产精品| 国产精品热久久久久夜色精品三区| 一区二区三区毛片| 国产精品一区在线观看乱码| 欧美另类久久久品| 中文字幕中文字幕一区| 久久99国产精品久久99| 欧亚洲嫩模精品一区三区| 国产清纯美女被跳蛋高潮一区二区久久w|