package com.nisum.mytime.utils;

import java.util.ArrayList;
import java.util.List;

public class CommomUtil {
	   public static List<String> getAddedManagersList(List<String> fromDb, List<String> fromUser) {
	        List<String> addedManagers = new ArrayList<String>();
	        if (fromDb != null)
	            for (String managerFromUser : fromUser) {
	                if (!fromDb.contains(managerFromUser))
	                    addedManagers.add(managerFromUser);
	            }
	        return addedManagers;
	    }
	    
	    public static List<String> getDeletedManagersList(List<String> fromDb, List<String> fromUser) {
	        List<String> deletedManager = new ArrayList<String>();
	        if (fromDb != null)
	            for (String managerFromDb : fromDb) {
	                if (!fromUser.contains(managerFromDb))
	                    deletedManager.add(managerFromDb);
	            }
	        return deletedManager;
	    }

	    public static String appendZero(int val) {
	    	return val<10?("0"+val):(val+"");  
	    } 
}
