Java Array Normalize normalizeMemberNames(final String[] memberNames)

Here you can find the source of normalizeMemberNames(final String[] memberNames)

Description

normalize Member Names

License

Open Source License

Parameter

Parameter Description
memberNames in the form memberNames[0] = "All Products", memberNames[1] = "Food", memberNames[2] = "Snacks"

Return

a String in the following format "[All Products].[Food].[Snacks]

Declaration

public static String normalizeMemberNames(final String[] memberNames) 

Method Source Code

//package com.java2s;
/*//from   w ww .  j  a va 2s  .com
 * Copyright (C) 2009 Luc Boudreau
 *
 * This program is free software; you can redistribute it and/or modify it 
 * under the terms of the GNU General Public License as published by the Free 
 * Software Foundation; either version 2 of the License, or (at your option) 
 * any later version.
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * 
 * See the GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License along 
 * with this program; if not, write to the Free Software Foundation, Inc., 
 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
 *
 */

public class Main {
    /**
     * @param memberNames
     *            in the form memberNames[0] = "All Products", memberNames[1] = "Food", memberNames[2] = "Snacks"
     * @return a String in the following format "[All Products].[Food].[Snacks]
     */
    public static String normalizeMemberNames(final String[] memberNames) {
        final StringBuffer buffer = new StringBuffer();
        /*for (final String name : memberNames) {
        buffer.append("[").append(name).append("]."); //$NON-NLS-1$ //$NON-NLS-2$
        }*/
        /*for (final String name: memberNames){
           buffer.append(name);
        }*/
        /*if (buffer.length() > 0)
        buffer.deleteCharAt(buffer.length() - 1); // Remove the last "."
        */
        return buffer.toString();
    }
}

Related

  1. normalizeL2(double[] histogram)
  2. normalizeLengthInPlace(double[] in)
  3. normalizeLog(double[] logs)
  4. normalizeMatrix(double[][] M)
  5. normalizeMatrix(float[] cm)
  6. normalizePositiveValues(double[][] array)
  7. normalizeProb(double[] prob)
  8. normalizeRecorderColumn(int column, int tabSize, int[] tabIndices)
  9. normalizeRows(float[][] input)