content: /**
   * Copyright (c) 2010-present Abixen Systems. All rights reserved.
   * <p>
   * This library is free software; you can redistribute it and/or modify it under
   * the terms of the GNU Lesser General Public License as published by the Free
   * Software Foundation; either version 2.1 of the License, or (at your option)
   * any later version.
   * <p>
   * This library is distributed in the hope that it will be useful, but WITHOUT
   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
   * details.
   */
  
  package com.abixen.platform.common.interfaces.web.page;
  
  
  import com.fasterxml.jackson.annotation.JsonCreator;
  import com.fasterxml.jackson.annotation.JsonProperty;
  import com.fasterxml.jackson.databind.JsonNode;
  import org.springframework.data.domain.*;
  
  import java.util.ArrayList;
  import java.util.List;
  
  public class PlatformPageImpl<T> extends PageImpl<T> {
  
      @JsonCreator(mode = JsonCreator.Mode.PROPERTIES)
      public PlatformPageImpl(@JsonProperty("content") List<T> content,
                              @JsonProperty("number") int number,
                              @JsonProperty("size") int size,
                              @JsonProperty("totalElements") Long totalElements,
                              @JsonProperty("pageable") JsonNode pageable,
                              @JsonProperty("last") boolean last,
                              @JsonProperty("totalPages") int totalPages,
                              @JsonProperty("sort") JsonNode sort,
                              @JsonProperty("first") boolean first,
                              @JsonProperty("empty") boolean empty) {
  
          super(content, PageRequest.of(number, size), totalElements);
      }
  
      public PlatformPageImpl(List<T> content, Pageable pageable, long total) {
          super(content, pageable, total);
      }
  
      public PlatformPageImpl(List<T> content) {
          super(content);
      }
  
      public PlatformPageImpl() {
          super(new ArrayList<>());
      }
  
  
  }