Google guava之Table简介说明
2022/7/29 23:24:40
本文主要是介绍Google guava之Table简介说明,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
转自:
http://www.java265.com/JavaCourse/202206/3778.html
Google Guava库是一个非常优秀的包含很多Java工具类集的库,广泛使用在Google公司内部,因此它可以被使用到几乎所有的Java项目中。Google Guava库最初发布在2007年。
Guava是对Java API的补充,对Java开发中常用功能进行更优雅的实现,使得编码更加轻松,代码容易理解。Guava使用了多种设计模式,同时经过了很多测试,得到了越来越多开发团队的青睐。Java最新版本的API采纳了Guava的部分功能,但依旧无法替代。
* 高效设计良好的API,被Google的开发者设计,实现和使用
* 遵循高效的java语法实践
* 使代码更刻度,简洁,简单
* 节约时间,资源,提高生产力 Guava工程包含了若干被Google的 Java项目广泛依赖 的核心库,例如:
1. 集合 [collections]
2. 缓存 [caching]
3. 原生类型支持 [primitives support]
4. 并发库 [concurrency libraries]
5. 通用注解 [common annotations]
6. 字符串处理 [string processing]
7. I/O
下文笔者讲述guava中Table集合的简介说明,如下所示
guava之Table集合简介
Table集合: 用于存储数据表,类似于Map<String,Map<String,String>>这种结构 Table集合实现了指定接口 ArrayTable, ForwardingTable, HashBasedTable, ImmutableTable, TreeBasedTable
例:
public static void main(String[] args) { Table<String,String,String> table= HashBasedTable.create(); table.put("keyIdA","类型111","备注111"); table.put("keyIdB","类型222","备注222"); table.put("keyIdC","类型333","备注333"); System.out.println(table.columnKeySet()); System.out.println(table.cellSet()); System.out.println(table.rowKeySet()); System.out.println(table.values()); System.out.println(table.rowMap()); System.out.println(table.columnMap()); }
这篇关于Google guava之Table简介说明的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-04-01got an unexpected keyword argument
- 2024-03-30维多利亚的秘密 golang入坑系统
- 2024-03-29mongodb sort by date
- 2024-03-29go swagger
- 2024-03-25mongodb cdc
- 2024-03-25how to use go in vscode
- 2024-03-22mongooseserverselectionerror: connect econnrefused ::1:27017
- 2024-03-21pymongo insert_many
- 2024-03-18projection mongodb
- 2024-03-14clickhouse-go