Examples of SliceImpl


Examples of com.ojn.gexf4j.core.impl.dynamic.SliceImpl

    rtgi.getAttributeValues().createValue(attIndegree, "0")
      .setEndDate(toDate("2009-03-01"));
    rtgi.getAttributeValues().createValue(attIndegree, "1")
      .setStartDate(toDate("2009-03-01"));
   
    rtgi.getSlices().add(new SliceImpl()
      .setEndDate(toDate("2009-03-01")));
    rtgi.getSlices().add(new SliceImpl()
      .setStartDate(toDate("2009-03-05"))
      .setEndDate(toDate("2009-03-10")));
   
    Node blab = gexf.getGraph().createNode("3");
    blab
View Full Code Here

Examples of org.springframework.data.domain.SliceImpl

    @SuppressWarnings({"unchecked", "rawtypes"})
    protected Object createPage(Iterable<?> result, Pageable pageable, Long count, boolean isPageQuery) {
        final List resultList = IteratorUtil.addToCollection(result, new ArrayList());
        if (pageable==null) {
            return isPageQuery ? new PageImpl(resultList) : new SliceImpl(resultList);
        }
        int pageSize = pageable.getPageSize();
        int requestedCountStart = pageable.getOffset();
        int resultSize = resultList.size();
        int currentTotal;
        if (count!=null) {
            currentTotal = count.intValue();
        } else {
            if (resultSize == pageSize) currentTotal = requestedCountStart + pageSize;
            else currentTotal = requestedCountStart + resultSize;
        }
        int resultWindowSize = Math.min(resultSize, pageSize);
        boolean hasNext = resultWindowSize < resultSize;
        List resultListPage = resultList.subList(0, resultWindowSize);

        return isPageQuery ?
                new PageImpl(resultListPage, pageable, currentTotal) :
                new SliceImpl(resultListPage,pageable, hasNext);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.