类 CollectionMathResult<K,M,N>
- java.lang.Object
-
- cn.woodwhales.common.business.collection.CollectionMathResult<K,M,N>
-
- 所有已实现的接口:
CollectionMath<K,M,N>
public class CollectionMathResult<K,M,N> extends Object implements CollectionMath<K,M,N>
- 作者:
- woodwhales on 2020-12-13 16:32
-
-
方法概要
-
-
-
方法详细资料
-
compute
public static <K,M,N> CollectionMathResult<K,M,N> compute(List<M> sourceList1, java.util.function.Function<M,K> keyFunction1, List<N> sourceList2, java.util.function.Function<N,K> keyFunction2)
集合操作- 类型参数:
K- 要比较的数据类型M- 集合 A 的数据类型N- 集合 B 的数据类型- 参数:
sourceList1- 集合 AkeyFunction1- 集合 A 生成 set 的接口sourceList2- 集合 BkeyFunction2- 集合 B 生成 set 的接口- 返回:
- CollectionMathResult
-
compute
public static <K,M,N> CollectionMathResult<K,M,N> compute(List<M> sourceList1, java.util.function.Function<M,K> keyFunction1, List<N> sourceList2, java.util.function.Function<N,K> keyFunction2, boolean lazyCompute)
集合操作- 类型参数:
K- 要比较的数据类型M- 集合 A 的数据类型N- 集合 B 的数据类型- 参数:
sourceList1- 集合 AkeyFunction1- 集合 A 生成 set 的接口sourceList2- 集合 BkeyFunction2- 集合 B 生成 set 的接口lazyCompute- 是否懒计算- 返回:
- CollectionMathResult
-
getIntersectionSet
public Set<CollectionFieldComparable<K>> getIntersectionSet()
从接口复制的说明:CollectionMath交集- 指定者:
getIntersectionSet在接口中CollectionMath<K,M,N>- 返回:
- 交集
-
getIntersectionKeySet
public Set<K> getIntersectionKeySet()
从接口复制的说明:CollectionMath交集- 指定者:
getIntersectionKeySet在接口中CollectionMath<K,M,N>- 返回:
- 交集
-
setIntersectionSet
public CollectionMathResult<K,M,N> setIntersectionSet(Set<CollectionFieldComparable<K>> intersectionSet)
-
getUnionKeySet
public Set<K> getUnionKeySet()
从接口复制的说明:CollectionMath并集- 指定者:
getUnionKeySet在接口中CollectionMath<K,M,N>- 返回:
- 并集
-
getUnionSet
public Set<CollectionFieldComparable<K>> getUnionSet()
从接口复制的说明:CollectionMath并集- 指定者:
getUnionSet在接口中CollectionMath<K,M,N>- 返回:
- 并集
-
setUnionSet
public CollectionMathResult<K,M,N> setUnionSet(Set<CollectionFieldComparable<K>> unionSet)
-
getPositiveDifferenceKeySet
public Set<K> getPositiveDifferenceKeySet()
正差集 A - B- 指定者:
getPositiveDifferenceKeySet在接口中CollectionMath<K,M,N>- 返回:
- 正差集 A - B
-
getPositiveDifferenceList
public List<M> getPositiveDifferenceList()
正差集 A - B- 指定者:
getPositiveDifferenceList在接口中CollectionMath<K,M,N>- 返回:
- 正差集 A - B
-
getPositiveDifferenceSet
public Set<CollectionFieldComparable<K>> getPositiveDifferenceSet()
正差集 A - B- 指定者:
getPositiveDifferenceSet在接口中CollectionMath<K,M,N>- 返回:
- 正差集 A - B
-
getNegativeDifferenceKeySet
public Set<K> getNegativeDifferenceKeySet()
负差集 B - A- 指定者:
getNegativeDifferenceKeySet在接口中CollectionMath<K,M,N>- 返回:
- 负差集 B - A
-
getNegativeDifferenceList
public List<N> getNegativeDifferenceList()
负差集 B - A- 指定者:
getNegativeDifferenceList在接口中CollectionMath<K,M,N>- 返回:
- 负差集 B - A
-
getNegativeDifferenceSet
public Set<CollectionFieldComparable<K>> getNegativeDifferenceSet()
负差集 B - A- 指定者:
getNegativeDifferenceSet在接口中CollectionMath<K,M,N>- 返回:
- 负差集 B - A
-
setPositiveDifferenceSet
public CollectionMathResult<K,M,N> setPositiveDifferenceSet(Set<CollectionFieldComparable<K>> positiveDifferenceSet)
-
setNegativeDifferenceSet
public CollectionMathResult<K,M,N> setNegativeDifferenceSet(Set<CollectionFieldComparable<K>> negativeDifferenceSet)
-
-