diff --git a/src/main/java/org/ntlab/acanthus_server/models/Gallery.java b/src/main/java/org/ntlab/acanthus_server/models/Gallery.java index 656618a..af1f83c 100644 --- a/src/main/java/org/ntlab/acanthus_server/models/Gallery.java +++ b/src/main/java/org/ntlab/acanthus_server/models/Gallery.java @@ -1,4 +1,29 @@ package org.ntlab.acanthus_server.models; +import java.util.*; + +/* + * 作品管理シングルトン + * + */ + public class Gallery { + private static Gallery theInstance = null; + private HashMap animationHashMap = new HashMap<>(); + + //シングルトン取得 + public static Gallery getInstance() { + if (theInstance == null) { + theInstance = new Gallery(); + } + return theInstance; + } + + /*インスタンス生成を禁止するコンストラクタ*/ + private Gallery(){ + + } + + public HashMap getMap(){return animationMap;} + }