@Test public void testIsRangeValid() { message = "paged set should determine rangevalidity correctly"; PagedSet<Object> set = new PagedSet<Object>(); assertTrue(message, set.isRangeValid(0, 1)); assertFalse(message, set.isRangeValid(1, 0)); assertFalse(message, set.isRangeValid(-1, 0)); assertFalse(message, set.isRangeValid(0, -1)); }
public boolean isRangeValid(final int from, final int to) { if ((from > to) || (from < 0) || (to < 0)) { return false; } return true; }
PagedSet implements Serializable { public boolean isRangeValid(final int from, final int to) { if ((from > to) || (from < 0) || (to < 0)) { return false; } return true; } }
PagedSet implements Serializable { public boolean isRangeValid(final int from, final int to) { if ((from > to) || (from < 0) || (to < 0)) { return false; } return true; } PagedSet();  PagedSet(final int from, final int to, final int inTotal, final List<T> set); }
PagedSet implements Serializable { public boolean isRangeValid(final int from, final int to) { if ((from > to) || (from < 0) || (to < 0)) { return false; } return true; } PagedSet();  PagedSet(final int from, final int to, final int inTotal, final List<T> set); boolean isRangeValid(final int from, final int to); int getFromIndex(); void setFromIndex(final int inFromIndex); int getToIndex(); void setToIndex(final int inToIndex); int getTotal(); void setTotal(final int inTotal); List<T> getPagedSet(); void setPagedSet(final List<T> inPagedSet); @SuppressWarnings("unchecked") @Override boolean equals(final Object set); @Override int hashCode(); String getElapsedTime(); void setElapsedTime(final String inElapsedTime); }
PagedSet implements Serializable { public boolean isRangeValid(final int from, final int to) { if ((from > to) || (from < 0) || (to < 0)) { return false; } return true; } PagedSet();  PagedSet(final int from, final int to, final int inTotal, final List<T> set); boolean isRangeValid(final int from, final int to); int getFromIndex(); void setFromIndex(final int inFromIndex); int getToIndex(); void setToIndex(final int inToIndex); int getTotal(); void setTotal(final int inTotal); List<T> getPagedSet(); void setPagedSet(final List<T> inPagedSet); @SuppressWarnings("unchecked") @Override boolean equals(final Object set); @Override int hashCode(); String getElapsedTime(); void setElapsedTime(final String inElapsedTime);  }