/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package pe.siso.horario.Beans;

import java.util.Arrays;
import java.util.List;

/**
 *
 * @author sistem20user
 */
public class NewMain {

	/**
	 * @param args the command line arguments
	 */
	public static void main(String[] args) {
////		List<Object> list = Arrays.asList("Lars", "Simon","prueba","adsvasdf");
//			list.forEach(System.out::println);
		List<String> list1 = createList();
		list1.sort(null); //ordenamos el arrayList
		list1.forEach(System.out::println);

		System.out.println("Sorting with a lamba expression for the comparison");
		List<String> list2 = createList();
		list2.sort((s1, s2) -> s1.compareToIgnoreCase(s2));
		list2.forEach(System.out::println);
		
		System.out.println("Sorting with a method references");
		List<String> list3=createList();
		list3.sort(String::compareToIgnoreCase);
		//list3.forEach(System.out::println);
		

	}

	private static List<String> createList() {
		return Arrays.asList("Alcatel", "android", "sony experia", "", "");
	}

}
