Java List Merge mergeTimeStrings(List strs)

Here you can find the source of mergeTimeStrings(List strs)

Description

merge Time Strings

License

Open Source License

Declaration

private static String mergeTimeStrings(List<String> strs) 

Method Source Code

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

import java.util.List;

public class Main {
    private static String mergeTimeStrings(List<String> strs) {
        StringBuilder sb = new StringBuilder();
        for (int i = strs.size() - 1; i >= 0; i--) {
            sb.append(strs.get(i));/* w w w .j ava2 s  .c om*/
            sb.append(' ');
        }

        int lastChar = sb.length() - 1;
        if (lastChar >= 0) {
            sb.deleteCharAt(lastChar);
        }

        return sb.toString();
    }
}

Related

  1. mergeOrdered( List base, List elems)
  2. mergepath(List pieces, String separator)
  3. mergerList(List sources, List targets)
  4. mergeSpeakerList(List speaker_list)
  5. mergeString(List strs)
  6. mergeTo(List target, List source)
  7. mergeToList(Object src, Object... args)
  8. mergeUniqElems(List src, List dest)
  9. safetyMergeCollection(List src, List target)

  10. HOME | Copyright © www.java2s.com 2016