zoukankan      html  css  js  c++  java
  • 测试treemap

    package com.suning.fms.ttms.service.impl;

    import com.alibaba.fastjson.JSON;

    import java.util.HashMap;
    import java.util.Map;
    import java.util.TreeMap;

    /**
    * Created by atai555 on 2020/2/21.
    */
    public class AAA {

    public static void main(String[] args) {
    System.out.println("hello");
    Map<String, String> map = new HashMap<String, String>();
    map.put("1", "a01");
    map.put("5", "a05");
    map.put("2", "a02");
    map.put("12", "a02");
    map.put("6", "a02");
    Map<String, String> treeMap = new TreeMap<String, String>();
    treeMap.putAll(map);
    System.out.println(treeMap);

    String s = "{"01":"对账平台数据","02":"对账平台补偿数据","09":"延保保费","10":"国内机票代收代付","11":"国内机票供应商费用","12":"促销承担方结算","13":"小贷","14":"网联扫码付","15":"积分兑彩","18":"铜板清算","19":"酒店代收代付","20":"酒店佣金","22":"小贷外催佣金","23":"卡管理系统","24":"基金代销","25":"促销先结结算","26":"促销后结结算","27":"宁互宝管理费","28":"玖富人保保费","29":"催收服务费","31":"权益结算","32":"融担数据","33":"信用卡分期贴息","34":"任性贷平台数据-小店体验金平台贴息","35":"零售云-货押贷-利息","37":"拒贷引流结算","39":"汽车助贷服务费","40":"个贷分润","41":"账速融系统","42":"保险理财系统","44":"气球贷","45":"额度任性贷","47":"易付宝垫资","48":"任性付消费垫资","57":"贴息费用结算","58":"资金成本结算","59":"月利息结算","60":"分润结算","64":"单笔任性贷"}";
    map = JSON.parseObject(s, TreeMap.class);
    System.out.println(map);
    treeMap.putAll(map);
    s = "{"05":"手续费补差数据","06":"保费","07":"佣金","08":"延保服务费","65":"单笔任性贷555"}";
    treeMap.putAll(JSON.parseObject(s, TreeMap.class));
    System.out.println(treeMap);
    treeMap.remove("10");
    System.out.println(treeMap);

    String s2 = "{"01":"对账平台数据","02":"对账平台补偿数据","09":"延保保费","10":"国内机票代收代付","11":"国内机票供应商费用","12":"促销承担方结算","13":"小贷","14":"网联扫码付","15":"积分兑彩","18":"铜板清算","19":"酒店代收代付","20":"酒店佣金","22":"小贷外催佣金","23":"卡管理系统","24":"基金代销","25":"促销先结结算","26":"促销后结结算","27":"宁互宝管理费","28":"玖富人保保费","29":"催收服务费","31":"权益结算","32":"融担数据","33":"信用卡分期贴息","34":"任性贷平台数据-小店体验金平台贴息","35":"零售云-货押贷-利息","37":"拒贷引流结算","39":"汽车助贷服务费","40":"个贷分润","41":"账速融系统","42":"保险理财系统","44":"气球贷","45":"额度任性贷","47":"易付宝垫资","48":"任性付消费垫资","57":"贴息费用结算","58":"资金成本结算","59":"月利息结算","60":"分润结算","64":"单笔任性贷"}";
    map = JSON.parseObject(s2, TreeMap.class);
    System.out.println(map);
    s2 = "{"05":"手续费补差数据","06":"保费","07":"佣金","08":"延保服务费","65":"单笔任性贷555"}";
    Map<String, String> map2 = JSON.parseObject(s2, TreeMap.class);
    System.out.println(map2);
    map.putAll(map2);
    map.remove("10");
    System.out.println(map);

    s2 = "{5:"手续费补差数据",6:"保费",55:"佣金"}";
    Map<String, String> treeMap2 = new TreeMap<String, String>();
    treeMap2 = JSON.parseObject(s2, TreeMap.class);
    System.out.println(treeMap2);

    }
    }
  • 相关阅读:
    ACM spiral grid
    ACM 数独
    Codeforces Round #242 (Div. 2) A. Squats
    Codeforces Round #242 (Div. 2) B. Megacity
    Codeforces Round #242 (Div. 2) C. Magic Formulas
    Coder-Strike 2014
    Coder-Strike 2014
    Coder-Strike 2014
    ACM Same binary weight
    C puzzles详解【13-15题】
  • 原文地址:https://www.cnblogs.com/atai/p/12345345.html
Copyright © 2011-2022 走看看