当前位置:网站首页>Stringutils and collectionutils
Stringutils and collectionutils
2022-07-04 00:59:00 【Forever HelloWorld】
1. String judgment tool (StringUtils)
// Determine if the string is null, or "". Be careful , String containing whitespace is not empty
boolean isEmpty(Object str)
// Determine whether the string ends with the specified content . Ignore case
boolean endsWithIgnoreCase(String str, String suffix)
// Determine whether the string has been specified at the beginning of the content . Ignore case
boolean startsWithIgnoreCase(String str, String prefix)
// Whether to include blanks
boolean containsWhitespace(String str)
// Judge that the string is not empty and the length is not 0, namely ,Not Empty
boolean hasLength(CharSequence str)
// Determine whether the string contains the actual content , That is, not only white space characters , That is to say Not Blank
boolean hasText(CharSequence str)
// Determines whether a string contains a substring at the specified index .
boolean substringMatch(CharSequence str, int index, CharSequence substring)
// Calculate the number of occurrences of the stator string in a string
int countOccurrencesOf(String str, String sub)
2. Set judgment tool (CollectionUtils)
// Judge List/Set Is it empty
boolean isEmpty(Collection<?> collection)
// Judge Map Is it empty
boolean isEmpty(Map<?,?> map)
// Judge List/Set Whether there is an object in
boolean containsInstance(Collection<?> collection, Object element)
// In the form of iterators , Judge List/Set Whether there is an object in
boolean contains(Iterator<?> iterator, Object element)
// Judge List/Set Whether to include any one of some objects
boolean containsAny(Collection<?> source, Collection<?> candidates)
// Judge List/Set Whether each element in the is unique . namely List/Set There are no repeating elements in
boolean hasUniqueObject(Collection<?> collection)
边栏推荐
- Introduction to A-frame virtual reality development
- Leetcode 121 best time to buy and sell stock (simple)
- Future源码一观-JUC系列
- system. Exit (0) and system exit(1)
- Is it really possible that the monthly salary is 3K and the monthly salary is 15K?
- @EnableAsync @Async
- 功能:求5行5列矩阵的主、副对角线上元素之和。注意, 两条对角线相交的元素只加一次。例如:主函数中给出的矩阵的两条对角线的和为45。
- The culprit of unrestrained consumption -- Summary
- 功能:求出菲波那契数列的前一项与后一项之比的极限的 近似值。例如:当误差为0.0001时,函数值为0.618056。
- Eight year test old bird, some suggestions for 1-3 year programmers
猜你喜欢
我管你什么okr还是kpi,PPT轻松交给你
基于.NetCore开发博客项目 StarBlog - (14) 实现主题切换功能
Interview script of Software Test Engineer
Pytest unit test framework: simple and easy to use parameterization and multiple operation modes
在寻求人类智能AI的过程中,Meta将赌注押向了自监督学习
AI helps make new breakthroughs in art design plagiarism retrieval! Professor Liu Fang's team paper was employed by ACM mm, a multimedia top-level conference
Function: store the strings entered in the main function in reverse order. For example, if you input the string "ABCDEFG", you should output "gfedcba".
Introduction to unity shader essentials reading notes Chapter III unity shader Foundation
be based on. NETCORE development blog project starblog - (14) realize theme switching function
Att & CK actual combat series - red team actual combat - V
随机推荐
From functional testing to automated testing, how did I successfully transform my salary to 15K +?
GUI 应用:socket 网络聊天室
基于.NetCore开发博客项目 StarBlog - (14) 实现主题切换功能
老姜的特点
AI 助力艺术设计抄袭检索新突破!刘芳教授团队论文被多媒体顶级会议ACM MM录用
It is worthy of "Alibaba internal software test interview notes" from beginning to end, all of which are essence
7.1 学习内容
不得不会的Oracle数据库知识点(一)
How to set the response description information when the response parameter in swagger is Boolean or integer
2-Redis架构设计到使用场景-四种部署运行模式(下)
机器学习基础:用 Lasso 做特征选择
[error record] configure NDK header file path in Visual Studio
PMP 考试常见工具与技术点总结
MPLS experiment
Summary of common tools and technical points of PMP examination
Severity code description the project file line prohibits the display of status error c4996 fopen ('fscanf ', StrCmp): this function or variable may be unsafe The most comprehensive solution
Is it really possible that the monthly salary is 3K and the monthly salary is 15K?
【.NET+MQTT】. Net6 environment to achieve mqtt communication, as well as bilateral message subscription and publishing code demonstration of server and client
AI helps make new breakthroughs in art design plagiarism retrieval! Professor Liu Fang's team paper was employed by ACM mm, a multimedia top-level conference
I don't care about you. OKR or KPI, PPT is easy for you