diff --git a/app/src/main/java/com/example/cosmosclient/app/Cosmos.java b/app/src/main/java/com/example/cosmosclient/app/Cosmos.java index 744c6d9..442cbeb 100644 --- a/app/src/main/java/com/example/cosmosclient/app/Cosmos.java +++ b/app/src/main/java/com/example/cosmosclient/app/Cosmos.java @@ -16,26 +16,29 @@ public void setToken(String token){ this.token = token; } + public String getToken(){ return token; } - //Group処理 - //再考 + //currentGroup処理 public void setCurrentGroup(Group g){ - curGroup = g; + setGroup(g); + curGroup = groups.get(g.getgId()); } + public Group getCurentGroup(){ return curGroup; } - //再考 + //Group処理 public void setGroup(Group g) { - if(groups.get(g.getgId()) == null) { + if (!groups.containsKey(g.getgId())) { String newGid = g.getgId(); groups.put(newGid, g); } } + public Group getGroup(String gId) { return groups.get(gId); } @@ -44,6 +47,7 @@ public void setuId(String uId){ this.uId = uId; } + public String getuId(){ return uId; }