X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdata%2FImage.java;h=0ae373afc5345d1cd022135223b6eaebbc9c88a9;hb=f76f59c8cf8dbc38a24a7450e1a78f5bb4791fec;hp=cae25207ba98238510a5b99e8da35c2c06923fcd;hpb=ca43577fb67eaa9199a4f42e62d4c802814ec9fe;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/data/Image.java b/src/main/java/net/pterodactylus/sone/data/Image.java index cae2520..0ae373a 100644 --- a/src/main/java/net/pterodactylus/sone/data/Image.java +++ b/src/main/java/net/pterodactylus/sone/data/Image.java @@ -29,6 +29,9 @@ public class Image { /** The ID of the image. */ private final String id; + /** The Sone the image belongs to. */ + private final Sone sone; + /** The key of the image. */ private final String key; @@ -50,6 +53,8 @@ public class Image { /** * Creates a new image. * + * @param sone + * The Sone the image belongs to * @param key * The key of the image * @param creationTime @@ -59,8 +64,8 @@ public class Image { * @param height * The height of the image */ - public Image(String key, long creationTime, int width, int height) { - this(UUID.randomUUID().toString(), key, creationTime, width, height); + public Image(Sone sone, String key, long creationTime, int width, int height) { + this(UUID.randomUUID().toString(), sone, key, creationTime, width, height); } /** @@ -68,6 +73,8 @@ public class Image { * * @param id * The ID of the image + * @param sone + * The Sone the image belongs to * @param key * The key of the image * @param creationTime @@ -77,8 +84,9 @@ public class Image { * @param height * The height of the image */ - public Image(String id, String key, long creationTime, int width, int height) { + public Image(String id, Sone sone, String key, long creationTime, int width, int height) { this.id = id; + this.sone = sone; this.key = key; this.creationTime = creationTime; this.width = width; @@ -99,6 +107,15 @@ public class Image { } /** + * Returns the Sone this image belongs to. + * + * @return The Sone this image belongs to + */ + public Sone getSone() { + return sone; + } + + /** * Returns the key of this image. * * @return The key of this image