Interface DataStructureConverter<I,​E>

    • Method Detail

      • open

        default void open​(ClassLoader classLoader)
      • toInternal

        I toInternal​(E external)
        Converts to internal data structure.

        Note: Parameter must not be null. Output must not be null.

      • toInternalOrNull

        default I toInternalOrNull​(E external)
        Converts to internal data structure or null.

        The nullability could be derived from the data type. However, this method reduces null checks.

      • toExternal

        E toExternal​(I internal)
        Converts to external data structure.

        Note: Parameter must not be null. Output must not be null.

      • toExternalOrNull

        default E toExternalOrNull​(I internal)
        Converts to external data structure or null.

        The nullability could be derived from the data type. However, this method reduces null checks.

      • isIdentityConversion

        default boolean isIdentityConversion()
        Returns whether this conversion is a no-op.

        An identity conversion means that the type is already an internal data structure.