当前位置:网站首页>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)
边栏推荐
- 2-redis architecture design to use scenarios - four deployment and operation modes (Part 2)
- 删除所有值为y的元素。数组元素中的值和y的值由主函数通过键盘输入。
- GUI application: socket network chat room
- 不得不会的Oracle数据库知识点(一)
- MySQL uses the view to report an error, explain/show can not be issued; lacking privileges for underlying table
- Flutter local database sqflite
- 我管你什么okr还是kpi,PPT轻松交给你
- 技術實踐|線上故障分析及解决方法(上)
- Generic
- Bodong medical sprint Hong Kong stocks: a 9-month loss of 200million Hillhouse and Philips are shareholders
猜你喜欢
![CesiumJS 2022^ 源码解读[8] - 资源封装与多线程](/img/d2/99932660298b4a4cddd7e5e69faca1.png)
CesiumJS 2022^ 源码解读[8] - 资源封装与多线程

Sorry, Tencent I also refused

Is it really possible that the monthly salary is 3K and the monthly salary is 15K?

Bodong medical sprint Hong Kong stocks: a 9-month loss of 200million Hillhouse and Philips are shareholders
![[common error] UART cannot receive data error](/img/77/6ba56ce6e64beeb73a77d04af5bd0f.jpg)
[common error] UART cannot receive data error

What is regression testing? Talk about regression testing in the eyes of Ali Test Engineers

A Kuan food rushed to the Shenzhen Stock Exchange: with annual sales of 1.1 billion, Hillhouse and Maotai CCB are shareholders

Function: find the sum of the elements on the main and sub diagonal of the matrix with 5 rows and 5 columns. Note that the elements where the two diagonals intersect are added only once. For example,

GUI 应用:socket 网络聊天室

CLP information - how does the digital transformation of credit business change from star to finger?
随机推荐
leetcode 121 Best Time to Buy and Sell Stock 买卖股票的最佳时机(简单)
Release and visualization of related data
Cloud dial test helps Weidong cloud education to comprehensively improve the global user experience
About uintptr_ T and IntPtr_ T type
8. Go implementation of string conversion integer (ATOI) and leetcode
Weekly open source project recommendation plan
Introduction to A-frame virtual reality development
How to be a professional software testing engineer? Listen to the byte five year old test
Struct in linked list
1-Redis架构设计到使用场景-四种部署运行模式(上)
查询效率提升10倍!3种优化方案,帮你解决MySQL深分页问题
删除所有值为y的元素。数组元素中的值和y的值由主函数通过键盘输入。
Future源码一观-JUC系列
@EnableAsync @Async
关于 uintptr_t和intptr_t 类型
Delete all elements with a value of Y. The values of array elements and y are entered by the main function through the keyboard.
The first training of wechat applet
Characteristics of ginger
What is the future of software testing industry? Listen to the test veterans' answers
数据库表外键的设计