public final class EmptyUtil extends Object
空集合判断工具
该工具的主要目标是快速地判断集合是否为空,其具备以下的几项功能Constructor and Description |
---|
EmptyUtil() |
Modifier and Type | Method and Description |
---|---|
static <T> boolean |
isEmpty(Collection<T> data)
判断集合是否为空
|
static <T> boolean |
isEmpty(List<T> list)
判断List是否为空
|
static <T> boolean |
isEmpty(Page<T> page)
判断分页对象是否为空
|
static <T> boolean |
isEmpty(org.springframework.data.domain.Page<T> page)
判断分页对象是否为空
|
static <T> boolean |
isEmpty(Set<T> data)
判断Set是否为空
|
static <T> boolean |
isEmpty(T[] data)
判断数组是否为空
|
static <T> boolean |
notEmpty(Collection<T> data)
判断集合是否不为空
|
static <T> boolean |
notEmpty(List<T> list)
判断List是否不为空
|
static <T> boolean |
notEmpty(Page<T> page)
判断分页对象是否不为空
|
static <T> boolean |
notEmpty(org.springframework.data.domain.Page<T> page)
判断分页对象是否不为空
|
static <T> boolean |
notEmpty(Set<T> data)
判断Set是否不为空
|
static <T> boolean |
notEmpty(T[] data)
判断数组是否不为空
|
static <T> boolean |
notOnlyOneElement(Collection<T> data)
判断集合是否不是只有一个元素,若集合为空或不是只有一个元素则返回为true
|
static <T> boolean |
onlyOneElement(Collection<T> data)
判断 集合是否只有一个元素
|
public static <T> boolean isEmpty(Page<T> page)
T
- 分页对象里元素的数据类型page
- 分页对象public static <T> boolean notEmpty(Page<T> page)
T
- 分页对象里元素的数据类型page
- 分页对象public static <T> boolean isEmpty(org.springframework.data.domain.Page<T> page)
T
- 分页对象里元素的数据类型page
- 分页对象public static <T> boolean notEmpty(org.springframework.data.domain.Page<T> page)
T
- 分页对象里元素的数据类型page
- 分页对象public static <T> boolean isEmpty(T[] data)
T
- 数组里元素的类型data
- 数据源public static <T> boolean notEmpty(T[] data)
T
- 数组里元素的类型data
- 数据源public static <T> boolean isEmpty(Set<T> data)
T
- Set里元素的类型data
- 数据源public static <T> boolean notEmpty(Set<T> data)
T
- Set里元素的类型data
- 数据源public static <T> boolean isEmpty(List<T> list)
T
- List里元素的类型list
- 数据源public static <T> boolean notEmpty(List<T> list)
T
- List里元素的类型list
- 数据源public static <T> boolean isEmpty(Collection<T> data)
T
- 集合里元素的类型data
- 数据源public static <T> boolean notEmpty(Collection<T> data)
T
- 集合里元素的类型data
- 数据源public static <T> boolean onlyOneElement(Collection<T> data)
T
- 集合里元素的类型data
- 数据源public static <T> boolean notOnlyOneElement(Collection<T> data)
T
- 集合里元素的类型data
- 数据源Copyright © 2021. All rights reserved.