package net.glowstone.io;

import java.io.IOException;
import java.util.UUID;

/**
 * Provider of I/O for world metadata.
 */
public interface WorldMetadataService {

    /**
     * Reads the world's metadata from storage, including final values such as seed and UUID that are only set on first load.
     *
     * @return A {@link WorldFinalValues} with the seed and UUID.
     */
    WorldFinalValues readWorldData();

    /**
     * Write the world's metadata to storage.
     *
     * @throws IOException if an I/O error occurs.
     */
    void writeWorldData() throws IOException;

    /**
     * A structure representing properties stored about a world that cannot be changed after its initialization, namely seed and UUID.
     */
    class WorldFinalValues {

        private final long seed;
        private final UUID uuid;

        public WorldFinalValues(long seed, UUID uuid) {
            this.seed = seed;
            this.uuid = uuid;
        }

        public long getSeed() {
            return seed;
        }

        public UUID getUuid() {
            return uuid;
        }
    }
}

@@ -70,16 +70,36 @@
 il.UUID;
+%0Aimport lombok.Data;
 %0A%0A/**%0A *
@@ -285,16 +285,23 @@
 UID that
+%0A     *
  are onl
@@ -712,16 +712,23 @@
 fter its
+%0A     *
  initial
@@ -762,24 +762,34 @@
 ID.%0A     */%0A
+    @Data%0A
     class Wo
@@ -805,17 +805,16 @@
 alues %7B%0A
-%0A
         
@@ -874,271 +874,8 @@
 uid;
-%0A%0A        public WorldFinalValues(long seed, UUID uuid) %7B%0A            this.seed = seed;%0A            this.uuid = uuid;%0A        %7D%0A%0A        public long getSeed() %7B%0A            return seed;%0A        %7D%0A%0A        public UUID getUuid() %7B%0A            return uuid;%0A        %7D
 %0A   

Fix CheckStyle issues in io/WorldMetadataService.java (#673)