diff --git a/src/main/java/cactusServer/models/Instances.java b/src/main/java/cactusServer/models/Instances.java index f24d232..0180e76 100644 --- a/src/main/java/cactusServer/models/Instances.java +++ b/src/main/java/cactusServer/models/Instances.java @@ -5,19 +5,21 @@ /** * �C���X�^���X���Ǘ�����N���X + * * @author ryo isitani * */ public class Instances { private static Instances theInstance = null; private HashMap instanceMap = new HashMap<>(); - + private Instances() { - + } - + /** * Instances�N���X���擾���� (�V���O���g��) + * * @return */ public static Instances getInstance() { @@ -26,24 +28,31 @@ } return theInstance; } - + /** - * �V����Instance�N���X���쐬����Map�ɒlj����� - * @param instanceId Instance�����ʂ����ӂ�ID - * @param name�@�C���X�^���X�� (��) + * �V����Instance���쐬����Map�ɒlj����� + * + * @param instanceId + * Instance�����ʂ����ӂ�ID + * @param name + * �C���X�^���X�� (��) + * @return �V�����쐬���ꂽInstance */ - public void createInstance(String instanceId, String name) { + public Instance createInstance(String instanceId, String name) { Instance instance = new Instance(name); instanceMap.put(instanceId, instance); + return instance; } /** * ID�ɑΉ�����Instance���擾���ĕԂ� - * @param instanceId �擾������Instance��ID + * + * @param instanceId + * �擾������Instance��ID * @return ID�ɑΉ�����Instance */ public Instance getInstance(String instanceId) { return instanceMap.get(instanceId); } - + }