GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - githubofrico/JTools: 增强 Java JDK 基础类库并提供相应工具类,以便于我们日常开发,避免重复造轮子。本项目正在持续更新中...

BranchesTags
Open more actions menu

Latest commit

 

History

3 Commits
3 Commits

Folders and files

NameName
Last commit message
Last commit date
.settings
.settings
 
 
src/com/edu/tju/rico/MapUtil
src/com/edu/tju/rico/MapUtil
 
 
.classpath
.classpath
 
 
.gitignore
.gitignore
 
 
.project
.project
 
 
README.md
README.md
 
 

Repository files navigation

JTools

Java JDK 基础类库增强,以便于我们日常开发,避免重复造轮子。本项目正在持续更新中...

目前,对 Java JDK 基础类库增强如下:

  • Map 的增强实现:根据Value对Map进行排序、根据Key对Map进行排序 和 保持Map插入顺序。 本工具类使得我们可以方便根据Value对Map进行排序,并将每条Map.Entry按序输出。但这种排序的稳定性是不确定的,其取决于Map的具体实现:若使用HashMap实现,由于HashMap是无序的,所以是不稳定的; 若使用LinkedHashMap实现,由于LinkedHashMap是保留插入顺序的,所以是稳定的。其中,所谓排序稳定是指,相同两项在排序后仍保持最初的顺序,不会颠倒。根据Key对Map进行排序与根据Value对Map进行排序的思想是一样的,不过这种排序是稳定的,和Map的具体实现无关,因为Key不同于Value,其在Map中是唯一的。 此外,如果需要使Map保持插入顺序,那么我们应该选用LinkedHashMap来实现Map,因为LinkedHashMap本身就具有这种特性,即其本身就可以使节点的输出顺序与输入顺序相同。

About

增强 Java JDK 基础类库并提供相应工具类,以便于我们日常开发,避免重复造轮子。本项目正在持续更新中...

Topics

javautilsjdkmap

Resources

Readme
Activity

Stars

3 stars

Watchers

1 watching

Forks

3 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.