Package io.kojan.xml

Interface Converter<SourceType,​TargetType>

  • Type Parameters:
    SourceType - type of objects to convert
    TargetType - type of objects after conversion
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface Converter<SourceType,​TargetType>
    Converter function. Converts objects of one type into objects of another type.
    Author:
    Mikolaj Izdebski
    • Method Detail

      • convert

        TargetType convert​(SourceType object)
        Converts objects of one type into objects of another type.
        Parameters:
        object - to convert
        Returns:
        converted object
      • nop

        static <Type> Type nop​(Type object)
        No operation converter that converts object to itself.
        Type Parameters:
        Type - type of objects
        Parameters:
        object - object to convert
        Returns:
        the same object