Class Identifiables
java.lang.Object
com.flowingcode.backendcore.model.Identifiables
Utility methods for
Identifiable objects.- Author:
- Javier Godoy / Flowing Code
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanequals(Identifiable<?> a, Object b) Compare twoIdentifiableobjects for equality.static <K> inthashCode(Identifiable<K> o) Return the hash code of anIdentifiablestatic StringtoString(Identifiable<?> obj) Return a string representation of theIdentifiable.
-
Constructor Details
-
Identifiables
public Identifiables()
-
-
Method Details
-
hashCode
Return the hash code of anIdentifiable -
equals
Compare twoIdentifiableobjects for equality. The result istrueiff:- Both arguments are instances of the same class, and
- Either both arguments refer to the same object (
a==b), or they both have non-nullidsuch thata.idis equal tob.id.
- Either both arguments refer to the same object (
- Both arguments are instances of the same class, and
-
toString
Return a string representation of theIdentifiable.
-