Class AbstractModularValueConverter.ConversionKey

  • Enclosing class:
    AbstractModularValueConverter

    protected static class AbstractModularValueConverter.ConversionKey
    extends java.lang.Object
    This class defines a key for efficient searching for conversions in maps.
    Author:
    Rene Schneider - initial API and implementation
    • Constructor Detail

      • ConversionKey

        public ConversionKey​(java.lang.Class<?> aSourceType,
                             java.lang.Class<?> aTargetType)
        Creates a new instance.
        Parameters:
        aSourceType - the source type
        aTargetType - the target type
      • ConversionKey

        public ConversionKey​(java.lang.Class<? extends Conversion<?,​?>> aConversion)
        Takes a Conversion implementation and determines the applicable conversion key.
        Parameters:
        aConversion - the conversion to look at
    • Method Detail

      • getSourceType

        public java.lang.Class<?> getSourceType()
      • getTargetType

        public java.lang.Class<?> getTargetType()
      • generateDerivedKeys

        public java.util.List<AbstractModularValueConverter.ConversionKey> generateDerivedKeys()
        Generates the derived conversion keys from the current key. "Derived keys" means keys which cover the whole target type superclass hierarchy.
        Returns:
        the derived key list
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object anObject)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object