当前位置:网站首页>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)
边栏推荐
- The difference between objects and objects
- Summary of common tools and technical points of PMP examination
- UTS | causal reasoning random intervention based on Reinforcement Learning
- Network layer - routing
- 数据库表外键的设计
- Function: find the approximate value of the limit of the ratio of the former term to the latter term of Fibonacci sequence. For example, when the error is 0.0001, the function value is 0.618056.
- Alibaba test engineer with an annual salary of 500000 shares notes: a complete set of written tests of software testing
- 不得不会的Oracle数据库知识点(一)
- 机器学习基础:用 Lasso 做特征选择
- A Kuan food rushed to the Shenzhen Stock Exchange: with annual sales of 1.1 billion, Hillhouse and Maotai CCB are shareholders
猜你喜欢
What is the future of software testing industry? Listen to the test veterans' answers
[cloud native topic -48]:kubesphere cloud Governance - operation - overview of multi tenant concept
MySQL winter vacation self-study 2022 12 (1)
Pratique technique | analyse et solution des défaillances en ligne (Partie 1)
What is the GPM scheduler for go?
【.NET+MQTT】.NET6 环境下实现MQTT通信,以及服务端、客户端的双边消息订阅与发布的代码演示
Struct in linked list
老姜的特点
How to set the response description information when the response parameter in swagger is Boolean or integer
Cesiumjs 2022^ source code interpretation [8] - resource encapsulation and multithreading
随机推荐
Sequence list and linked list
be based on. NETCORE development blog project starblog - (14) realize theme switching function
[dynamic programming] leetcode 53: maximum subarray sum
Release and visualization of related data
功能:求5行5列矩阵的主、副对角线上元素之和。注意, 两条对角线相交的元素只加一次。例如:主函数中给出的矩阵的两条对角线的和为45。
Summary of common tools and technical points of PMP examination
Is the securities account opened by Caicai for individuals safe? Is there a routine
Swagger2 quick start and use
From functools import reduce -- see the use of reduce function from typical examples
技术实践|线上故障分析及解决方法(上)
Introduction to unity shader essentials reading notes Chapter III unity shader Foundation
Why use get/set instead of exposing properties
Global and Chinese market of underwater bags 2022-2028: Research Report on technology, participants, trends, market size and share
A little understanding of GSLB (global server load balance) technology
求esp32C3板子连接mssql方法
[software testing] you haven't mastered these real interview questions of big companies?
Cesiumjs 2022^ source code interpretation [8] - resource encapsulation and multithreading
Struct in linked list
机器学习基础:用 Lasso 做特征选择
Unity Shader入门精要读书笔记 第三章 Unity Shader基础