Java String Index Of getIndexString(T array, String indexPrefix, String separatorPrefix)

Here you can find the source of getIndexString(T array, String indexPrefix, String separatorPrefix)

Description

get Index String

License

Open Source License

Declaration

public static <T extends List<V>, V> String getIndexString(T array, String indexPrefix,
            String separatorPrefix) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.List;

public class Main {
    public static <T extends List<V>, V> String getIndexString(T array, String indexPrefix,
            String separatorPrefix) {
        StringBuilder builder = new StringBuilder();

        for (int LCV = 0; LCV < array.size(); LCV++) {
            builder.append(indexPrefix);
            builder.append(array.get(LCV));
            builder.append(separatorPrefix);

            if (LCV != array.size() - 1) {
                builder.append(", ");
            }//from w w w  .  j  a  v  a 2s.c o m
        }

        return builder.toString();
    }
}

Related

  1. getAllIndex(String source, String rex)
  2. getIndexesOf(String word, String value)
  3. getIndexOfChar(String str, String start, String end)
  4. getIndexOrConstraintName(String command)
  5. getLowerBoundsOfAllStrings(int length, int seedIndex, int routeLength)
  6. getMatchingIndexes(final String source, final String match)
  7. getMergedLine(String lineOne, String lineTwo, int insertingIndex)
  8. getNewlineIndexes(String src)