@Test public void testRangeAdjust() { EventList<String> source = new BasicEventList<>(); source.addAll(GlazedListsTests.stringToList("ABCDEFGHIJKLMNOPQRSTUVWXYZ")); RangeList<String> rangeList = new RangeList<>(source); ListConsistencyListener.install(rangeList); assertEquals(source, rangeList); rangeList.setHeadRange(1, 2); assertEquals(GlazedListsTests.stringToList("B"), rangeList); rangeList.setHeadRange(-5, -1); assertEquals(GlazedListsTests.stringToList("WXYZ"), rangeList); rangeList.setHeadRange(-10, -1); assertEquals(GlazedListsTests.stringToList("RSTUVWXYZ"), rangeList); rangeList.setHeadRange(-13, -4); assertEquals(GlazedListsTests.stringToList("OPQRSTUVW"), rangeList); rangeList.setHeadRange(-10, -7); assertEquals(GlazedListsTests.stringToList("RST"), rangeList); rangeList.setHeadRange(-15, -12); assertEquals(GlazedListsTests.stringToList("MNO"), rangeList); rangeList.setHeadRange(-15, -9); assertEquals(GlazedListsTests.stringToList("MNOPQR"), rangeList); rangeList.setHeadRange(-13, -6); assertEquals(GlazedListsTests.stringToList("OPQRSTU"), rangeList); rangeList.setHeadRange(-15, -2); assertEquals(GlazedListsTests.stringToList("MNOPQRSTUVWXY"), rangeList); rangeList.setHeadRange(30, 40); assertEquals(Collections.EMPTY_LIST, rangeList); rangeList.setHeadRange(0, 3); assertEquals(GlazedListsTests.stringToList("ABC"), rangeList); rangeList.setHeadRange(-30, -40); assertEquals(Collections.EMPTY_LIST, rangeList); rangeList.setHeadRange(0, 3); assertEquals(GlazedListsTests.stringToList("ABC"), rangeList); }
public void setHeadRange(int startIndex, int endIndex) { this.desiredStart = startIndex; this.desiredEnd = endIndex; adjustRange(); }
RangeList extends TransformedList<E, E> { public void setHeadRange(int startIndex, int endIndex) { this.desiredStart = startIndex; this.desiredEnd = endIndex; adjustRange(); } }
RangeList extends TransformedList<E, E> { public void setHeadRange(int startIndex, int endIndex) { this.desiredStart = startIndex; this.desiredEnd = endIndex; adjustRange(); } RangeList(EventList<E> source); }
RangeList extends TransformedList<E, E> { public void setHeadRange(int startIndex, int endIndex) { this.desiredStart = startIndex; this.desiredEnd = endIndex; adjustRange(); } RangeList(EventList<E> source); @Override final void listChanged(ListEvent<E> listChanges); @Deprecated void setRange(int startIndex, int endIndex); void setHeadRange(int startIndex, int endIndex); void setMiddleRange(int startIndex, int endIndex); void setTailRange(int startIndex, int endIndex); @Override final int size(); int getStartIndex(); int getEndIndex(); }
RangeList extends TransformedList<E, E> { public void setHeadRange(int startIndex, int endIndex) { this.desiredStart = startIndex; this.desiredEnd = endIndex; adjustRange(); } RangeList(EventList<E> source); @Override final void listChanged(ListEvent<E> listChanges); @Deprecated void setRange(int startIndex, int endIndex); void setHeadRange(int startIndex, int endIndex); void setMiddleRange(int startIndex, int endIndex); void setTailRange(int startIndex, int endIndex); @Override final int size(); int getStartIndex(); int getEndIndex();  }