package com.chenyang.nse.bussiness.commmon.json;

import java.io.Serializable;
import java.util.Collections;
import java.util.List;

public class ListSlice<T> implements Serializable {
   private static final ListSlice EMPTY_SLICE = new ListSlice(0L, Collections.emptyList());
   private final long total;
   private final List<T> list;

   public ListSlice() {
      this.total = 0L;
      this.list = null;
   }

   public ListSlice(long total, List<T> list) {
      this.total = total;
      this.list = list;
   }

   public long getTotal() {
      return this.total;
   }

   public List<T> getList() {
      return this.list;
   }

   public static <T> ListSlice<T> emptySlice() {
      return EMPTY_SLICE;
   }
}
