Newer
Older
CosmosServer / src / main / java / com / example / cosmos_serversb / jsons / GroupsMapJson.java
t-kume on 11 Jul 2019 539 bytes 細かな修正
//このクラスは仮です
package com.example.cosmos_serversb.jsons;

import com.example.cosmos_serversb.entities.Group;
import com.example.cosmos_serversb.entities.User;

import java.util.*;

public class GroupsMapJson {
    private Map<String, String> groups = new HashMap<>();

    public GroupsMapJson(User user){
        changeGroupsMap(user.getGroups());
    }

    private void changeGroupsMap(Set set){
        for ( Group group : (Set<Group>) set ) {
            groups.put(group.getgId(), group.getUri());
        }
    }
}