Package 

Class EffectSerializationFactory

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      static List<Effect> effectsFromFile(File effectFile) Get a list of effects from the specified file.
      static void effectToFile(File effectFile, Effect effect) Write the given effect to the destination file.
      static void effectsToFile(File effectFile, List<Effect> effects) Write the given effects to the destination file.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • effectsFromFile

         static List<Effect> effectsFromFile(File effectFile)

        Get a list of effects from the specified file. Try to deserialize a JSON file at first. If this operation is not successful (for the sake of backward compatibility) try to deserialize a binary file.

        Parameters:
        effectFile - Source file
      • effectToFile

         static void effectToFile(File effectFile, Effect effect)

        Write the given effect to the destination file.

        Parameters:
        effectFile - Destination file
        effect - Effect
      • effectsToFile

         static void effectsToFile(File effectFile, List<Effect> effects)

        Write the given effects to the destination file.

        Parameters:
        effectFile - Destination file
        effects - List of effects