@@ -0,0 +1,871 @@
+import java.util.*;%0A%0Aimport org.biojava.bio.seq.*;%0Aimport org.biojava.bio.seq.tools.*;%0A%0A/**%0A * Demonstration of the WindowedResidueList class.%0A * %3CP%3E%0A * This program generates a random DNA sequence. It then constructs%0A * views of this sequence that are onto windows of width 1-5.%0A * Each view is then printed out, so that you can check that the%0A * WindowResidueList is the correct sequence.%0A */%0Apublic class TestWindowedResidueList %7B%0A  public static void main(String %5B%5D args)%0A  throws Exception %7B%0A    ResidueList res = SeqTools.createResidueList(3*4*5);%0A    %0A    for(int w = 1; w %3C= 6; w++) %7B%0A      ResidueList view = new WindowedResidueList(res, w);%0A      System.out.println(%22Window %22 + w + %22 view:%22);%0A      for(int i = 1; i %3C= view.length(); i++) %7B%0A        System.out.println(i + %22: %22 + view.residueAt(i).getName());%0A      %7D%0A      System.out.println(%22%5Cn%22);%0A    %7D%0A  %7D%0A%7D%0A

Shows how you can slice a sequence into non-overlapping windows.