예제 #1
0
  void setRequirements(List<Requirement> requirements) {
    allRequirements = requirements;

    requirementMap = new HashMap<String, List<Requirement>>();
    for (Requirement requirement : requirements) {
      List<Requirement> list = requirementMap.get(requirement.getNamespace());
      if (list == null) {
        list = new LinkedList<Requirement>();
        requirementMap.put(requirement.getNamespace(), list);
      }
      list.add(requirement);
    }
  }
예제 #2
0
  void setCapabilities(List<Capability> capabilities) {
    allCapabilities = capabilities;

    capabilityMap = new HashMap<String, List<Capability>>();
    for (Capability capability : capabilities) {
      List<Capability> list = capabilityMap.get(capability.getNamespace());
      if (list == null) {
        list = new LinkedList<Capability>();
        capabilityMap.put(capability.getNamespace(), list);
      }
      list.add(capability);
    }
  }