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 aMappingKeyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionClass<?> Returns the value of thedestinationrecord component.final booleanIndicates whether some other object is "equal to" this one.fromMapper(Class<?> aMapperClass) Get theSimpleMapperRegistry.MappingKeyfrom theClassrepresenting the mapper.fromUpdater(Class<?> anUpdaterClass) Get theSimpleMapperRegistry.MappingKeyfrom theClassrepresenting the updater.final inthashCode()Returns a hash code value for this object.reversed()Reverses this key.Class<?> source()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MappingKey
Creates an instance of aMappingKeyrecord class.- Parameters:
source- the value for thesourcerecord componentdestination- the value for thedestinationrecord component
-
-
Method Details
-
reversed
Reverses this key.- Returns:
- the key
-
fromMapper
Get theSimpleMapperRegistry.MappingKeyfrom theClassrepresenting the mapper.- Parameters:
aMapperClass- the mapper class- Returns:
- the
SimpleMapperRegistry.MappingKey
-
fromUpdater
Get theSimpleMapperRegistry.MappingKeyfrom theClassrepresenting 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 thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
destination
Returns the value of thedestinationrecord component.- Returns:
- the value of the
destinationrecord component
-