获取分页的表格数据

@param pPageIndex 页码 从1开始
@param pPageSize  页大小

@return
480926
@Override
    public GridMessage listPage(int pPageIndex, int pPageSize) {
        GridMessage data = new GridMessage();
        data.setData(invokePage(pPageIndex, pPageSize));
        data.setTotal(mDao.selectCount(null));
        return data;
    }
368757
public static int pxToDp(Context context, int px) {
    DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics();
    return (int) ((px / displayMetrics.density) + 0.5);
  }
73412
int getGeometryUserIndex(int geom, int index) {
		int pindex = getGeometryIndex_(geom);
		AttributeStreamOfInt32 stream = m_geometry_indices.get(index);
		if (pindex < stream.size())
			return stream.read(pindex);
		else
			return -1;
	}
399656
public static final PaperSize getPaperSize(ULocale locale){
        UResourceBundle obj = measurementTypeBundleForLocale(locale, PAPER_SIZE);
        int[] size = obj.getIntVector();
        return new PaperSize(size[0], size[1]);
    }
961454
public static <E> Page<E> startPage(int pageNum, int pageSize, boolean count, Boolean reasonable, Boolean pageSizeZero) {
        Page<E> page = new Page<E>(pageNum, pageSize, count);
        page.setReasonable(reasonable);
        page.setPageSizeZero(pageSizeZero);
        //当已经执行过orderBy的时候
        Page<E> oldPage = getLocalPage();
        if (oldPage != null && oldPage.isOrderByOnly()) {
            page.setOrderBy(oldPage.getOrderBy());
        }
        setLocalPage(page);
        return page;
    }
593838
public static long parseSpaceSize(String spaceSize) {
    double alpha = 0.0001;
    String ori = spaceSize;
    String end = "";
    int index = spaceSize.length() - 1;
    while (index >= 0) {
      if (spaceSize.charAt(index) > '9' || spaceSize.charAt(index) < '0') {
        end = spaceSize.charAt(index) + end;
      } else {
        break;
      }
      index--;
    }
    spaceSize = spaceSize.substring(0, index + 1);
    double ret = Double.parseDouble(spaceSize);
    end = end.toLowerCase();
    if (end.isEmpty() || end.equals("b")) {
      return (long) (ret + alpha);
    } else if (end.equals("kb") || end.equals("k")) {
      return (long) (ret * Constants.KB + alpha);
    } else if (end.equals("mb") || end.equals("m")) {
      return (long) (ret * Constants.MB + alpha);
    } else if (end.equals("gb") || end.equals("g")) {
      return (long) (ret * Constants.GB + alpha);
    } else if (end.equals("tb") || end.equals("t")) {
      return (long) (ret * Constants.TB + alpha);
    } else if (end.equals("pb") || end.equals("p")) {
      // When parsing petabyte values, we can't multiply with doubles and longs, since that will
      // lose presicion with such high numbers. Therefore we use a BigDecimal.
      BigDecimal pBDecimal = new BigDecimal(Constants.PB);
      return pBDecimal.multiply(BigDecimal.valueOf(ret)).longValue();
    } else {
      throw new IllegalArgumentException("Fail to parse " + ori + " to bytes");
    }
  }
470653
public static XWPFRun getRun(int paragraphIndex, int runIndex) {
        createXwpfDocumentIfNull();
        return xwpfDocument.getParagraphs().get(paragraphIndex).getRuns().get(runIndex);
    }
1022309
public T get(int index) {
		if (index >= items.size() || index < 0) {
			throw new IndexOutOfBoundsException("size: " + items.size() + " index: " + index);
		}
		return items.get(index);
	}
499550
@VisibleForTesting
  static int chooseTableSize(int setSize) {
    if (setSize == 1) {
      return 2;
    }
    // Correct the size for open addressing to match desired load factor.
    // Round up to the next highest power of 2.
    int tableSize = Integer.highestOneBit(setSize - 1) << 1;
    while (tableSize * DESIRED_LOAD_FACTOR < setSize) {
      tableSize <<= 1;
    }
    return tableSize;
  }
975964
IndexWriter getIndexWriterForProviders( Set<String> providerNames ) {
        List<IndexProvider> reindexProviders = new LinkedList<>();
        for (IndexProvider provider : providers.values()) {
            if (providerNames.contains(provider.getName())) {
                reindexProviders.add(provider);
            }
        }
        return CompositeIndexWriter.create(reindexProviders);
    }
440706
public long getIPv4PrefixCount(int prefixLength) {
		checkSubnet(this, prefixLength);
		if(isMultiple()) {
			int networkSegmentIndex = getNetworkSegmentIndex(prefixLength, IPv4Address.BYTES_PER_SEGMENT, IPv4Address.BITS_PER_SEGMENT);
			int hostSegmentIndex = getHostSegmentIndex(prefixLength, IPv4Address.BYTES_PER_SEGMENT, IPv4Address.BITS_PER_SEGMENT);
			boolean hasPrefixedSegment = (networkSegmentIndex == hostSegmentIndex);
			return getCount(i -> {
				if(hasPrefixedSegment && i == networkSegmentIndex) {
					return getSegment(i).getPrefixValueCount();
				}
				return getSegment(i).getValueCount();
			}, networkSegmentIndex + 1);
		}
		return 1;
	}
222802
@Override
    public PaginatedList queryForPaginatedList(String statementName, Object parameterObject,
                                               int pageSize) throws DataAccessException {
        return super.queryForPaginatedList(statementName, parameterObject, pageSize);
    }
298694
public int getIndex (String methodName) {
		for (int i = 0, n = methodNames.length; i < n; i++)
			if (methodNames[i].equals(methodName)) return i;
		throw new IllegalArgumentException("Unable to find non-private method: " + methodName);
	}
1153299
@Override
	@Pure
	public RoadPolyline getMapElementAt(int index) {
		final Iterator<RoadSegment> segments = this.roadNetwork.iterator();
		for (int i = 0; i < index - 1 && segments.hasNext(); ++i) {
			segments.next();
		}
		if (segments.hasNext()) {
			return (RoadPolyline) segments.next();
		}
		throw new IndexOutOfBoundsException();
	}
228022
public final Long formatIndex(final PhoneNumberInterface pphoneNumberData) {
    if (isPhoneNumberNotEmpty(pphoneNumberData)) {
      return Long.valueOf(StringUtils.defaultString(pphoneNumberData.getCountryCode())
          + StringUtils.defaultString(pphoneNumberData.getAreaCode())
          + StringUtils.defaultString(pphoneNumberData.getLineNumber())
          + StringUtils.defaultString(pphoneNumberData.getExtension()));
    }
    return null;
  }
617622
public T get(int index) throws IndexOutOfBoundsException {
        if (index >= mSize || index < 0) {
            throw new IndexOutOfBoundsException("Asked to get item at " + index + " but size is "
                    + mSize);
        }
        return mData[index];
    }
1004823
@Override
	public HashSet<ResourceIndexedSearchParamNumber> extractSearchParamNumber(ResourceTable theEntity, IBaseResource theResource) {
		HashSet<ResourceIndexedSearchParamNumber> retVal = new HashSet<ResourceIndexedSearchParamNumber>();

		Collection<RuntimeSearchParam> searchParams = getSearchParams(theResource);
		for (RuntimeSearchParam nextSpDef : searchParams) {
			if (nextSpDef.getParamType() != RestSearchParameterTypeEnum.NUMBER) {
				continue;
			}

			String nextPath = nextSpDef.getPath();
			if (isBlank(nextPath)) {
				continue;
			}

			for (Object nextObject : extractValues(nextPath, theResource)) {
				if (nextObject == null || ((IDatatype) nextObject).isEmpty()) {
					continue;
				}

				String resourceName = nextSpDef.getName();
				boolean multiType = false;
				if (nextPath.endsWith("[x]")) {
					multiType = true;
				}

				if (nextObject instanceof DurationDt) {
					DurationDt nextValue = (DurationDt) nextObject;
					if (nextValue.getValueElement().isEmpty()) {
						continue;
					}

					if (new UriDt(SearchParamConstants.UCUM_NS).equals(nextValue.getSystemElement())) {
						if (isNotBlank(nextValue.getCode())) {

							Unit<? extends Quantity> unit = Unit.valueOf(nextValue.getCode());
							javax.measure.converter.UnitConverter dayConverter = unit.getConverterTo(NonSI.DAY);
							double dayValue = dayConverter.convert(nextValue.getValue().doubleValue());
							DurationDt newValue = new DurationDt();
							newValue.setSystem(SearchParamConstants.UCUM_NS);
							newValue.setCode(NonSI.DAY.toString());
							newValue.setValue(dayValue);
							nextValue = newValue;

							/*
							 * @SuppressWarnings("unchecked") PhysicsUnit<? extends
							 * org.unitsofmeasurement.quantity.Quantity<?>> unit = (PhysicsUnit<? extends
							 * org.unitsofmeasurement.quantity.Quantity<?>>)
							 * UCUMFormat.getCaseInsensitiveInstance().parse(nextValue.getCode().getValue(), null); if
							 * (unit.isCompatible(UCUM.DAY)) {
							 *
							 * @SuppressWarnings("unchecked") PhysicsUnit<org.unitsofmeasurement.quantity.Time> timeUnit =
							 * (PhysicsUnit<Time>) unit; UnitConverter conv = timeUnit.getConverterTo(UCUM.DAY); double
							 * dayValue = conv.convert(nextValue.getValue().getValue().doubleValue()); DurationDt newValue =
							 * new DurationDt(); newValue.setSystem(UCUM_NS); newValue.setCode(UCUM.DAY.getSymbol());
							 * newValue.setValue(dayValue); nextValue=newValue; }
							 */
						}
					}

					ResourceIndexedSearchParamNumber nextEntity = new ResourceIndexedSearchParamNumber(resourceName, nextValue.getValue());
					nextEntity.setResource(theEntity);
					retVal.add(nextEntity);
				} else if (nextObject instanceof QuantityDt) {
					QuantityDt nextValue = (QuantityDt) nextObject;
					if (nextValue.getValueElement().isEmpty()) {
						continue;
					}

					ResourceIndexedSearchParamNumber nextEntity = new ResourceIndexedSearchParamNumber(resourceName, nextValue.getValue());
					nextEntity.setResource(theEntity);
					retVal.add(nextEntity);
				} else if (nextObject instanceof IntegerDt) {
					IntegerDt nextValue = (IntegerDt) nextObject;
					if (nextValue.getValue() == null) {
						continue;
					}

					ResourceIndexedSearchParamNumber nextEntity = new ResourceIndexedSearchParamNumber(resourceName, new BigDecimal(nextValue.getValue()));
					nextEntity.setResource(theEntity);
					retVal.add(nextEntity);
				} else if (nextObject instanceof DecimalDt) {
					DecimalDt nextValue = (DecimalDt) nextObject;
					if (nextValue.getValue() == null) {
						continue;
					}

					ResourceIndexedSearchParamNumber nextEntity = new ResourceIndexedSearchParamNumber(resourceName, nextValue.getValue());
					nextEntity.setResource(theEntity);
					retVal.add(nextEntity);
				} else {
					if (!multiType) {
						throw new ConfigurationException("Search param " + resourceName + " is of unexpected datatype: " + nextObject.getClass());
					} else {
						continue;
					}
				}
			}
		}

		return retVal;
	}