package com.github.hunter0x7c7.sync.utils; import java.util.List; public class ListUtil { public static T getDataByList(T[] list, int index) { if (list != null && index < list.length && index >= 0) { return list[index]; } return null; } public static T getDataByList(List list, int index) { if (list != null && index < list.size() && index >= 0) { return list.get(index); } return null; } }