Here you can find the source of isPhaseGroupContainsPhase(int index, String phaseName)
Parameter | Description |
---|---|
index | an index of a phase group. |
phaseName | a name of the phase which presence in the phase group is to be tested. |
true
if specified phase group contains the phase, false
if it doesn't.
public static boolean isPhaseGroupContainsPhase(int index, String phaseName)
//package com.java2s; import java.util.ArrayList; import java.util.List; import java.util.Set; public class Main { /**/*from w w w . j a v a2 s . c o m*/ * This member variable holds the list of sets. Every set in this list denotes a single phase * group and defines the phases included in that group. */ private static List<Set<String>> phaseGroupPhases = new ArrayList<Set<String>>(); /** * This static method determines if a phase group referenced by its index contains specified * phase. The phase is specified by its name. * * @return <code>true</code> if specified phase group contains the phase, <code>false</code> * if it doesn't. * @param index * an index of a phase group. * @param phaseName * a name of the phase which presence in the phase group is to be tested. */ public static boolean isPhaseGroupContainsPhase(int index, String phaseName) { return phaseGroupPhases.get(index).contains(phaseName); } }