Interface NitriteMapper

All Superinterfaces:
AutoCloseable, NitritePlugin
All Known Implementing Classes:
SimpleNitriteMapper

public interface NitriteMapper extends NitritePlugin
An interface that provides a method to try converting an object of one type to an object of another type.
Since:
1.0
Author:
Anindya Chatterjee.
  • Method Summary

    Modifier and Type
    Method
    Description
    <Source, Target>
    Object
    tryConvert(Source source, Class<Target> type)
    Tries to convert an object of type Source to an object of type Target.

    Methods inherited from interface org.dizitart.no2.common.module.NitritePlugin

    close, initialize
  • Method Details

    • tryConvert

      <Source, Target> Object tryConvert(Source source, Class<Target> type)
      Tries to convert an object of type Source to an object of type Target. If the conversion is not possible, it will return the source object.
      Type Parameters:
      Source - the type parameter
      Target - the type parameter
      Parameters:
      source - the source
      type - the type
      Returns:
      the target