Class TransportableConverter


  • public class TransportableConverter
    extends java.lang.Object
    Provides utility method for converting between differing transportable types.
    • Constructor Detail

      • TransportableConverter

        private TransportableConverter()
        Utility class -- not meant to be instantiated.
    • Method Detail

      • convert

        public static Transportable convert​(Transportable convert_me,
                                            TransportableFactory factory)
        Convert a transportable to the type of transportable returned by a factory.
        Parameters:
        convert_me - The transportable to get converted. Must implement toStream().
        factory - The factory used to create the return Transportable, which must implement fromStream().
        Returns:
        -
      • convert

        public static void convert​(Transportable convert_me,
                                   Transportable into_me)
        Copy the contents of one transportable into the other transportable.
        Parameters:
        convert_me - The transportable to get converted. Must implement toStream().
        into_me - The transportable to get populated. Must implement fromStream().