Java String Index Of isPhaseGroupContainsPhase(int index, String phaseName)

Here you can find the source of isPhaseGroupContainsPhase(int index, String phaseName)

Description

This static method determines if a phase group referenced by its index contains specified phase.

License

Open Source License

Parameter

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.

Return

true if specified phase group contains the phase, false if it doesn't.

Declaration

public static boolean isPhaseGroupContainsPhase(int index, String phaseName) 

Method Source Code


//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);
    }
}

Related

  1. indexOfClosingBracket(String text, int openingBracket)
  2. indexOfIgnoreCase(final String src, char c, int startIndex, int endIndex)
  3. indexOfIgnoreCase(String str, String substring)
  4. indexOfMultiple(String line, char character, int count, int startIndex)
  5. indexOfWord(String word, String string)
  6. lastIndexOf(String pattern, String s)
  7. lastIndexOfIgnoreCase(final String s, final String subS)
  8. mergeStringLines(String lineOne, String lineTwo, int keyIndex, int insertingIndex)
  9. readColumn(int columnIndex, String inputString, String columnSeparator)