public <T> ListPage<T> paginate(List<T> inputList, int page, int itemsPerPage) {
		List<T> paginatedList = new ArrayList<T>();
		int nItems = inputList.size();
		int nPages = nPages(nItems, itemsPerPage);
		
		if (page < 1) {
			page = 1;
		} else if (page > nPages) {
			page = nPages;
		}
		
		int start = (page - 1) * itemsPerPage;
		int end   =  page      * itemsPerPage;
		if (end > nItems) {
			end = nItems;
		}
		
		paginatedList = inputList.subList(start, end);
		ListPage<T> retList = new ListPage<T>(paginatedList, page);
		return retList;
	}