Record Class SimpleMapperRegistry.MappingKey
java.lang.Object
java.lang.Record
dev.getelements.elements.sdk.model.util.SimpleMapperRegistry.MappingKey
- Record Components:
source
-destination
-
- Enclosing class:
SimpleMapperRegistry
public static record SimpleMapperRegistry.MappingKey(Class<?> source, Class<?> destination)
extends Record
Represents a key for a
MapperRegistry.Mapper
or an MapperRegistry.Updater
-
Constructor Summary
ConstructorsConstructorDescriptionMappingKey
(Class<?> source, Class<?> destination) Creates an instance of aMappingKey
record class. -
Method Summary
Modifier and TypeMethodDescriptionClass
<?> Returns the value of thedestination
record component.final boolean
Indicates whether some other object is "equal to" this one.fromMapper
(Class<?> aMapperClass) Get theSimpleMapperRegistry.MappingKey
from theClass
representing the mapper.fromUpdater
(Class<?> anUpdaterClass) Get theSimpleMapperRegistry.MappingKey
from theClass
representing the updater.final int
hashCode()
Returns a hash code value for this object.reversed()
Reverses this key.Class
<?> source()
Returns the value of thesource
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
MappingKey
Creates an instance of aMappingKey
record class.- Parameters:
source
- the value for thesource
record componentdestination
- the value for thedestination
record component
-
-
Method Details
-
reversed
Reverses this key.- Returns:
- the key
-
fromMapper
Get theSimpleMapperRegistry.MappingKey
from theClass
representing the mapper.- Parameters:
aMapperClass
- the mapper class- Returns:
- the
SimpleMapperRegistry.MappingKey
-
fromUpdater
Get theSimpleMapperRegistry.MappingKey
from theClass
representing the updater.- Parameters:
anUpdaterClass
- the mapper class- Returns:
- the
SimpleMapperRegistry.MappingKey
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
source
Returns the value of thesource
record component.- Returns:
- the value of the
source
record component
-
destination
Returns the value of thedestination
record component.- Returns:
- the value of the
destination
record component
-