Java List Sort sortStringList(List l, boolean ascending)

Here you can find the source of sortStringList(List l, boolean ascending)

Description

sort String List

License

Open Source License

Declaration

public static List<String> sortStringList(List<String> l, boolean ascending) 

Method Source Code

//package com.java2s;
/****************************************************************************
 * Copyright (c) 2008-2011 Matthew Ballance and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors://  w w w .ja  v a 2 s.  c o m
 *     Matthew Ballance - initial implementation
 ****************************************************************************/

import java.util.ArrayList;

import java.util.List;

public class Main {
    public static List<String> sortStringList(List<String> l, boolean ascending) {
        List<String> ret = new ArrayList<String>();
        ret.addAll(l);

        return ret;
    }
}

Related

  1. sortRepositorynames(List list)
  2. sortSimpleName(List list)
  3. sortSimpleName(List list)
  4. sortString(Set lists)
  5. sortStringEnumeration(Enumeration list)
  6. sortStringList(List stringList)
  7. sortStringList(String[] listToSort, String[] priorityList)
  8. sortUniq(List list)
  9. sortUniqueTags(List unsortedTags)