当前位置:网站首页>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)
边栏推荐
- 长文综述:大脑中的熵、自由能、对称性和动力学
- What is the GPM scheduler for go?
- Pytest unit test framework: simple and easy to use parameterization and multiple operation modes
- The super fully automated test learning materials sorted out after a long talk with a Tencent eight year old test all night! (full of dry goods
- 机器学习基础:用 Lasso 做特征选择
- [error record] configure NDK header file path in Visual Studio (three header file paths of NDK | ASM header file path selection related to CPU architecture)
- Future source code view -juc series
- 打印菱形图案
- 功能:将主函数中输入的字符串反序存放。例如:输入字符串“abcdefg”,则应输出“gfedcba”。
- Understanding of Radix
猜你喜欢

swagger中响应参数为Boolean或是integer如何设置响应描述信息

Struct in linked list

Introduction to A-frame virtual reality development

2-Redis架构设计到使用场景-四种部署运行模式(下)

What is the potential of pocket network, which is favored by well-known investors?

Technical practice online fault analysis and solutions (Part 1)

The super fully automated test learning materials sorted out after a long talk with a Tencent eight year old test all night! (full of dry goods

Query efficiency increased by 10 times! Three optimization schemes to help you solve the deep paging problem of MySQL

A malware detection method for checking PLC system using satisfiability modulus theoretical model

Pratique technique | analyse et solution des défaillances en ligne (Partie 1)
随机推荐
7.1 学习内容
1-redis architecture design to use scenarios - four deployment and operation modes (Part 1)
Mobile asynchronous sending SMS verification code solution -efficiency+redis
system. Exit (0) and system exit(1)
From functools import reduce -- see the use of reduce function from typical examples
A malware detection method for checking PLC system using satisfiability modulus theoretical model
Windos10 reinstallation system tutorial
【.NET+MQTT】. Net6 environment to achieve mqtt communication, as well as bilateral message subscription and publishing code demonstration of server and client
Optimization of for loop
The frost peel off the purple dragon scale, and the xiariba people will talk about database SQL optimization and the principle of indexing (primary / secondary / clustered / non clustered)
All in one 1407: stupid monkey
A dichotomy of Valentine's Day
Understanding of Radix
Alibaba test engineer with an annual salary of 500000 shares notes: a complete set of written tests of software testing
Print diamond pattern
[complimentary ppt] kubemeet Chengdu review: make the delivery and management of cloud native applications easier!
Struct in linked list
功能:求5行5列矩阵的主、副对角线上元素之和。注意, 两条对角线相交的元素只加一次。例如:主函数中给出的矩阵的两条对角线的和为45。
基于.NetCore开发博客项目 StarBlog - (14) 实现主题切换功能
GUI application: socket network chat room