Class EntityHelper
- java.lang.Object
-
- ch.colabproject.colab.api.model.tools.EntityHelper
-
public class EntityHelper extends Object
Helper to normalize common operations on WithId objects- Author:
- maxence
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanequals(WithId a, Object b)Object.equals(java.lang.Object)implementation for all WithId implementation.static inthashCode(WithId object)Object.hashCode()implementation for all WithId implementation
-
-
-
Method Detail
-
hashCode
public static int hashCode(WithId object)
Object.hashCode()implementation for all WithId implementation- Parameters:
object- object to hash- Returns:
- a hash code value for the given object.
-
equals
public static boolean equals(WithId a, Object b)
Object.equals(java.lang.Object)implementation for all WithId implementation. Objects equal if- it's the same reference (strict == equality)
- both are null
- they are instance of the same class and have the same id
- Parameters:
a- first objectb- second object- Returns:
trueif both objects represent the same persisted entity
-
-