public class EqualsLambda extends Object
| Constructor and Description |
|---|
EqualsLambda() |
| Modifier and Type | Method and Description |
|---|---|
static <T> boolean |
equals(T a,
T b,
EqualsCheck<T> equalsCheck)
Does what
Objects.equals(java.lang.Object, java.lang.Object)
does, except allows to use methods to check equality as lambda. |
static <T> boolean |
equalsList(List<T> a,
List<T> b,
EqualsCheck<T> equalsCheck)
Checks that all elements in
a are contained in b at the
same position. |
static <K,V> boolean |
equalsMap(Map<K,V> a,
Map<K,V> b,
EqualsCheck<K> equalsCheckKey,
EqualsCheck<V> equalsCheckValue)
Checks that all mappings between key and value in
a are contained
in b. |
static <T> boolean |
equalsSet(Set<T> a,
Set<T> b,
EqualsCheck<T> equalsCheck)
Checks that all elements in
a are contained in b. |
public static <T> boolean equals(T a,
T b,
EqualsCheck<T> equalsCheck)
Objects.equals(java.lang.Object, java.lang.Object)
does, except allows to use methods to check equality as lambda.T - allows to restrict the type of arguments to comparea - the first itemb - the first itemequalsCheck - the equality check to usetrue if a and b are equal to each other,
false otherwisepublic static <T> boolean equalsSet(Set<T> a, Set<T> b, EqualsCheck<T> equalsCheck)
a are contained in b.T - allows to restrict the type of arguments to comparea - the first setb - the second setequalsCheck - the equality check to usetrue if all elements in a are contained in
b and b contains no other items, false otherwisepublic static <T> boolean equalsList(List<T> a, List<T> b, EqualsCheck<T> equalsCheck)
a are contained in b at the
same position.T - allows to restrict the type of arguments to comparea - the first listb - the second listequalsCheck - the equality check to usetrue if all elements in a are contained in
b at the same position and b contains no other elements,
false otherwisepublic static <K,V> boolean equalsMap(Map<K,V> a, Map<K,V> b, EqualsCheck<K> equalsCheckKey, EqualsCheck<V> equalsCheckValue)
a are contained
in b.K - allows to restrict the type of keys in both mapsV - allows to restrict the type of values in both mapsa - the first mapb - the second mapequalsCheckKey - the equality check to use for keysequalsCheckValue - the equality check to use for valuestrue if the key set of a and b is equals
as defined by
#equalsSet(java.util.Set, java.util.Set, richtercloud.project1.jar.controller.EqualsCheck)
and all keys in a are mapped to the same values as they are in
b, false otherwiseCopyright © 2018. All rights reserved.