Interface WorldIo

All Known Implementing Classes:
JsonWorldIo

@NullMarked public interface WorldIo
Defines the API contract for serializing and deserializing a World.
  • Method Details

    • stringify

      String stringify(World world)
      Serializes a World into a string.
      Parameters:
      world - the World to serialize
      Returns:
      the serialized World
    • parse

      World parse(String worldString)
      Deserializes a string into a World.
      Parameters:
      worldString - the string to deserialize
      Returns:
      the deserialized World
    • processWorldAfterDeserialize

      static void processWorldAfterDeserialize(World world)
      Loops through each Entity in a World and calls Component.afterDeserialize(World) for each Component of the Entity.
      Parameters:
      world - the World to process