private static void addUsedBlame( List<UsedBlames> usedBlames, Capability usedCap, List<Requirement> blameReqs, Capability matchingCap) { // Create a new Blame based off the used capability and the // blame chain requirements. Blame newBlame = new Blame(usedCap, blameReqs); // Find UsedBlame that uses the same capablity as the new blame. UsedBlames addToBlame = null; for (UsedBlames usedBlame : usedBlames) { if (usedCap.equals(usedBlame.m_cap)) { addToBlame = usedBlame; break; } } if (addToBlame == null) { // If none exist create a new UsedBlame for the capability. addToBlame = new UsedBlames(usedCap); usedBlames.add(addToBlame); } // Add the new Blame and record the matching capability cause // in case the root requirement has multiple cardinality. addToBlame.addBlame(newBlame, matchingCap); }
private boolean checkMultiple( ResolveSession session, UsedBlames usedBlames, Blame usedBlame, Candidates permutation) { // Check the root requirement to see if it is a multiple cardinality // requirement. List<Capability> candidates = null; Requirement req = usedBlame.m_reqs.get(0); if (Util.isMultiple(req)) { // Create a copy of the current permutation so we can remove the // candidates causing the blame. if (session.getMultipleCardCandidates() == null) { session.setMultipleCardCandidates(permutation.copy()); } // Get the current candidate list and remove all the offending root // cause candidates from a copy of the current permutation. candidates = session.getMultipleCardCandidates().clearCandidates(req, usedBlames.getRootCauses(req)); } // We only are successful if there is at least one candidate left // for the requirement return (candidates != null) && !candidates.isEmpty(); }
private boolean checkMultiple( ResolveSession session, UsedBlames usedBlames, Blame usedBlame, Candidates permutation) { // Check the root requirement to see if it is a multiple cardinality // requirement. List<Capability> candidates = null; Requirement req = usedBlame.m_reqs.get(0); if (Util.isMultiple(req)) { // Create a copy of the current permutation so we can remove the // candidates causing the blame. if (session.getMultipleCardCandidates() == null) { session.setMultipleCardCandidates(permutation.copy()); } // Get the current candidate list and remove all the offending root // cause candidates from a copy of the current permutation. candidates = session.getMultipleCardCandidates().getCandidates(req); candidates.removeAll(usedBlames.getRootCauses(req)); } // We only are successful if there is at least one candidate left // for the requirement return (candidates != null) && !candidates.isEmpty(); }
private boolean checkMultiple( ResolveSession session, UsedBlames usedBlames, Blame usedBlame, Candidates permutation) { // Check the root requirement to see if it is a multiple cardinality // requirement. List<Capability> candidates = null; Requirement req = usedBlame.m_reqs.get(0); if (Util.isMultiple(req)) { // Create a copy of the current permutation so we can remove the // candidates causing the blame. if (session.getMultipleCardCandidates() == null) { session.setMultipleCardCandidates(permutation.copy()); } // Get the current candidate list and remove all the offending root // cause candidates from a copy of the current permutation. candidates = session.getMultipleCardCandidates().clearCandidates(req, usedBlames.getRootCauses(req)); } // We only are successful if there is at least one candidate left // for the requirement return (candidates != null) && !candidates.isEmpty(); }
boolean checkMultiple( UsedBlames usedBlames, Blame usedBlame, Candidates permutation) { // Check the root requirement to see if it is a multiple cardinality // requirement. CandidateSelector candidates = null; Requirement req = usedBlame.m_reqs.get(0); if (Util.isMultiple(req)) { // Create a copy of the current permutation so we can remove the // candidates causing the blame. if (m_multipleCardCandidates == null) { m_multipleCardCandidates = permutation.copy(); } // Get the current candidate list and remove all the offending root // cause candidates from a copy of the current permutation. candidates = m_multipleCardCandidates.clearMultipleCardinalityCandidates(req, usedBlames.getRootCauses(req)); } // We only are successful if there is at least one candidate left // for the requirement return (candidates != null) && !candidates.isEmpty(); }
boolean checkMultiple( UsedBlames usedBlames, Blame usedBlame, Candidates permutation) { // Check the root requirement to see if it is a multiple cardinality // requirement. CandidateSelector candidates = null; Requirement req = usedBlame.m_reqs.get(0); if (Util.isMultiple(req)) { // Create a copy of the current permutation so we can remove the // candidates causing the blame. if (m_multipleCardCandidates == null) { m_multipleCardCandidates = permutation.copy(); } // Get the current candidate list and remove all the offending root // cause candidates from a copy of the current permutation. candidates = m_multipleCardCandidates.clearMultipleCardinalityCandidates(req, usedBlames.getRootCauses(req)); } // We only are successful if there is at least one candidate left // for the requirement return (candidates != null) && !candidates.isEmpty(); }
boolean checkMultiple( UsedBlames usedBlames, Blame usedBlame, Candidates permutation) { // Check the root requirement to see if it is a multiple cardinality // requirement. CandidateSelector candidates = null; Requirement req = usedBlame.m_reqs.get(0); if (Util.isMultiple(req)) { // Create a copy of the current permutation so we can remove the // candidates causing the blame. if (m_multipleCardCandidates == null) { m_multipleCardCandidates = permutation.copy(); } // Get the current candidate list and remove all the offending root // cause candidates from a copy of the current permutation. candidates = m_multipleCardCandidates.clearMultipleCardinalityCandidates(req, usedBlames.getRootCauses(req)); } // We only are successful if there is at least one candidate left // for the requirement return (candidates != null) && !candidates.isEmpty(); }
private boolean checkMultiple( ResolveSession session, UsedBlames usedBlames, Blame usedBlame, Candidates permutation) { // Check the root requirement to see if it is a multiple cardinality // requirement. List<Capability> candidates = null; Requirement req = usedBlame.m_reqs.get(0); if (Util.isMultiple(req)) { // Create a copy of the current permutation so we can remove the // candidates causing the blame. if (session.getMultipleCardCandidates() == null) { session.setMultipleCardCandidates(permutation.copy()); } // Get the current candidate list and remove all the offending root // cause candidates from a copy of the current permutation. candidates = session.getMultipleCardCandidates().clearCandidates(req, usedBlames.getRootCauses(req)); } // We only are successful if there is at least one candidate left // for the requirement return (candidates != null) && !candidates.isEmpty(); }
boolean checkMultiple( UsedBlames usedBlames, Blame usedBlame, Candidates permutation) { // Check the root requirement to see if it is a multiple cardinality // requirement. CandidateSelector candidates = null; Requirement req = usedBlame.m_reqs.get(0); if (Util.isMultiple(req)) { // Create a copy of the current permutation so we can remove the // candidates causing the blame. if (m_multipleCardCandidates == null) { m_multipleCardCandidates = permutation.copy(); } // Get the current candidate list and remove all the offending root // cause candidates from a copy of the current permutation. candidates = m_multipleCardCandidates.clearMultipleCardinalityCandidates(req, usedBlames.getRootCauses(req)); } // We only are successful if there is at least one candidate left // for the requirement return (candidates != null) && !candidates.isEmpty(); }
boolean checkMultiple( UsedBlames usedBlames, Blame usedBlame, Candidates permutation) { // Check the root requirement to see if it is a multiple cardinality // requirement. CandidateSelector candidates = null; Requirement req = usedBlame.m_reqs.get(0); if (Util.isMultiple(req)) { // Create a copy of the current permutation so we can remove the // candidates causing the blame. if (m_multipleCardCandidates == null) { m_multipleCardCandidates = permutation.copy(); } // Get the current candidate list and remove all the offending root // cause candidates from a copy of the current permutation. candidates = m_multipleCardCandidates.clearMultipleCardinalityCandidates(req, usedBlames.getRootCauses(req)); } // We only are successful if there is at least one candidate left // for the requirement return (candidates != null) && !candidates.isEmpty(); }
private static void addUsedBlame( Map<Capability, UsedBlames> usedBlames, Capability usedCap, List<Requirement> blameReqs, Capability matchingCap) { // Create a new Blame based off the used capability and the // blame chain requirements. Blame newBlame = new Blame(usedCap, blameReqs); // Find UsedBlame that uses the same capablity as the new blame. UsedBlames addToBlame = usedBlames.get(usedCap); if (addToBlame == null) { // If none exist create a new UsedBlame for the capability. addToBlame = new UsedBlames(usedCap); usedBlames.put(usedCap, addToBlame); } // Add the new Blame and record the matching capability cause // in case the root requirement has multiple cardinality. addToBlame.addBlame(newBlame, matchingCap); }
boolean checkMultiple( UsedBlames usedBlames, Blame usedBlame, Candidates permutation) { // Check the root requirement to see if it is a multiple cardinality // requirement. CandidateSelector candidates = null; Requirement req = usedBlame.m_reqs.get(0); if (Util.isMultiple(req)) { // Create a copy of the current permutation so we can remove the // candidates causing the blame. if (m_multipleCardCandidates == null) { m_multipleCardCandidates = permutation.copy(); } // Get the current candidate list and remove all the offending root // cause candidates from a copy of the current permutation. candidates = m_multipleCardCandidates.clearMultipleCardinalityCandidates(req, usedBlames.getRootCauses(req)); } // We only are successful if there is at least one candidate left // for the requirement return (candidates != null) && !candidates.isEmpty(); }
private static void addUsedBlame( ArrayMap<Capability, UsedBlames> usedBlames, Capability usedCap, List<Requirement> blameReqs, Capability matchingCap) { // Create a new Blame based off the used capability and the // blame chain requirements. Blame newBlame = new Blame(usedCap, blameReqs); // Find UsedBlame that uses the same capablity as the new blame. UsedBlames addToBlame = usedBlames.getOrCompute(usedCap); // Add the new Blame and record the matching capability cause // in case the root requirement has multiple cardinality. addToBlame.addBlame(newBlame, matchingCap); }
private static void addUsedBlame( ArrayMap<Capability, UsedBlames> usedBlames, Capability usedCap, List<Requirement> blameReqs, Capability matchingCap) { // Create a new Blame based off the used capability and the // blame chain requirements. Blame newBlame = new Blame(usedCap, blameReqs); // Find UsedBlame that uses the same capablity as the new blame. UsedBlames addToBlame = usedBlames.getOrCompute(usedCap); // Add the new Blame and record the matching capability cause // in case the root requirement has multiple cardinality. addToBlame.addBlame(newBlame, matchingCap); }
private static void addUsedBlame( ArrayMap<Capability, UsedBlames> usedBlames, Capability usedCap, List<Requirement> blameReqs, Capability matchingCap) { // Create a new Blame based off the used capability and the // blame chain requirements. Blame newBlame = new Blame(usedCap, blameReqs); // Find UsedBlame that uses the same capablity as the new blame. UsedBlames addToBlame = usedBlames.getOrCompute(usedCap); // Add the new Blame and record the matching capability cause // in case the root requirement has multiple cardinality. addToBlame.addBlame(newBlame, matchingCap); }
private static void addUsedBlame( ArrayMap<Capability, UsedBlames> usedBlames, Capability usedCap, List<Requirement> blameReqs, Capability matchingCap) { // Create a new Blame based off the used capability and the // blame chain requirements. Blame newBlame = new Blame(usedCap, blameReqs); // Find UsedBlame that uses the same capablity as the new blame. UsedBlames addToBlame = usedBlames.getOrCompute(usedCap); // Add the new Blame and record the matching capability cause // in case the root requirement has multiple cardinality. addToBlame.addBlame(newBlame, matchingCap); }
private static void addUsedBlame( ArrayMap<Capability, UsedBlames> usedBlames, Capability usedCap, List<Requirement> blameReqs, Capability matchingCap) { // Create a new Blame based off the used capability and the // blame chain requirements. Blame newBlame = new Blame(usedCap, blameReqs); // Find UsedBlame that uses the same capablity as the new blame. UsedBlames addToBlame = usedBlames.getOrCompute(usedCap); // Add the new Blame and record the matching capability cause // in case the root requirement has multiple cardinality. addToBlame.addBlame(newBlame, matchingCap); }
private static void addUsedBlame( ArrayMap<Capability, UsedBlames> usedBlames, Capability usedCap, List<Requirement> blameReqs, Capability matchingCap) { // Create a new Blame based off the used capability and the // blame chain requirements. Blame newBlame = new Blame(usedCap, blameReqs); // Find UsedBlame that uses the same capablity as the new blame. UsedBlames addToBlame = usedBlames.getOrCompute(usedCap); // Add the new Blame and record the matching capability cause // in case the root requirement has multiple cardinality. addToBlame.addBlame(newBlame, matchingCap); }
private static void addUsedBlame( ArrayMap<Capability, UsedBlames> usedBlames, Capability usedCap, List<Requirement> blameReqs, Capability matchingCap) { // Create a new Blame based off the used capability and the // blame chain requirements. Blame newBlame = new Blame(usedCap, blameReqs); // Find UsedBlame that uses the same capablity as the new blame. UsedBlames addToBlame = usedBlames.getOrCompute(usedCap); // Add the new Blame and record the matching capability cause // in case the root requirement has multiple cardinality. addToBlame.addBlame(newBlame, matchingCap); }
private static void addUsedBlame( ArrayMap<Capability, UsedBlames> usedBlames, Capability usedCap, List<Requirement> blameReqs, Capability matchingCap) { // Create a new Blame based off the used capability and the // blame chain requirements. Blame newBlame = new Blame(usedCap, blameReqs); // Find UsedBlame that uses the same capablity as the new blame. UsedBlames addToBlame = usedBlames.getOrCompute(usedCap); // Add the new Blame and record the matching capability cause // in case the root requirement has multiple cardinality. addToBlame.addBlame(newBlame, matchingCap); }