X - The type of the user typepublic class MutableBasicUserType<X> extends AbstractMutableBasicUserType<X>
| Modifier and Type | Field and Description |
|---|---|
static BasicUserType<?> |
INSTANCE |
DIRTY_MARKER| Constructor and Description |
|---|
MutableBasicUserType() |
| Modifier and Type | Method and Description |
|---|---|
X |
deepClone(X object)
Clones the given object if the type is mutable to be able to detect mutations.
|
int |
hashCode(X object)
Returns the hash code of the object for lookups in hash based collections.
|
boolean |
isDeepEqual(X initial,
X current)
Returns
true if the given objects are equal regarding their values. |
boolean |
isEqual(X initial,
X current)
Returns
true if the given objects are equal regarding their identity. |
boolean |
supportsDeepCloning()
Returns
true if the type supports creating deep clones, false otherwise. |
boolean |
supportsDeepEqualChecking()
Returns
true if the type supports checking deep equality, false otherwise. |
getDirtyProperties, isMutable, shouldPersist, supportsDirtyChecking, supportsDirtyTrackingpublic static final BasicUserType<?> INSTANCE
public boolean supportsDeepEqualChecking()
BasicUserTypetrue if the type supports checking deep equality, false otherwise.
Deep equality checking, in contrast to normal equality checking, compares objects by their actual values rather than maybe just their identity.
For value types, deep equality checking is the same as normal equality checking.supportsDeepEqualChecking in interface BasicUserType<X>supportsDeepEqualChecking in class AbstractMutableBasicUserType<X>public boolean supportsDeepCloning()
BasicUserTypetrue if the type supports creating deep clones, false otherwise.
Deep clones are only necessary for mutable types that don't support dirty checking. Immutable types can simply return true.supportsDeepCloning in interface BasicUserType<X>supportsDeepCloning in class AbstractMutableBasicUserType<X>public boolean isEqual(X initial, X current)
BasicUserTypetrue if the given objects are equal regarding their identity.
For value types, this is the same as deep equality checking.isEqual in interface BasicUserType<X>isEqual in class AbstractMutableBasicUserType<X>initial - The first objectcurrent - The second objectpublic boolean isDeepEqual(X initial, X current)
BasicUserTypetrue if the given objects are equal regarding their values.
If deep equality is not supported, returns false.isDeepEqual in interface BasicUserType<X>isDeepEqual in class AbstractMutableBasicUserType<X>initial - The first objectcurrent - The second objectpublic int hashCode(X object)
BasicUserTypehashCode in interface BasicUserType<X>hashCode in class AbstractMutableBasicUserType<X>object - The objectpublic X deepClone(X object)
BasicUserTypefalse or dirty checking is properly supported.object - The object to cloneCopyright © 2014–2018 Blazebit. All rights reserved.