Class Utils
java.lang.Object
org.qubership.atp.environments.model.utils.Utils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Supplier<T> emptySup()static <T extends Identified>
booleanChecks target object has expected class and id.static <T extends Identified>
booleanTo not to copy pasteObject.equals(Object)logic.static booleanisEqual(Identified o1, Object o2) To not to copy pasteObject.equals(Object)logic.
-
Field Details
-
JOINER_DOT
public static final com.google.common.base.Joiner JOINER_DOT
-
-
Constructor Details
-
Utils
public Utils()
-
-
Method Details
-
emptySup
-
isEqual
To not to copy pasteObject.equals(Object)logic.- Parameters:
o1- object to compare with o2o2- object to compare with o1- Returns:
- true if equals
-
isEqual
public static <T extends Identified> boolean isEqual(@Nonnull Class<T> clazz, @Nonnull T o1, @Nullable Object o2) To not to copy pasteObject.equals(Object)logic.- Type Parameters:
T- general superclass of o1 and o2- Parameters:
clazz- general superclass of o1 and o2o1- object to compare with o2o2- object to compare with o1- Returns:
- true if equals
-
isEqual
public static <T extends Identified> boolean isEqual(@Nonnull Class<T> clazz, @Nonnull UUID id, @Nullable Object target) Checks target object has expected class and id.- Type Parameters:
T- type- Parameters:
clazz- which should be extended by targetid- expected id of targettarget- checking object- Returns:
- true if target has expected type and id
-