Skip to content

Commit

Permalink
selector
Browse files Browse the repository at this point in the history
  • Loading branch information
nglthu committed Mar 7, 2024
1 parent 4c0b143 commit 6512977
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/main/java/com/mycompany/app/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import java.lang.Math;
import java.lang.Object;
import java.nio.channels.Selector;

//import user-built specific class
import com.mycompany.app.*;
Expand All @@ -45,6 +46,7 @@

import com.mycompany.app.Animal.*;
import com.mycompany.app.Sequence.SequenceA;
import com.mycompany.app.Sequence.Selector;


import com.mycompany.app.Node.*;
Expand Down Expand Up @@ -174,9 +176,13 @@ public static void main(String[] args) {
for(int i=0; i<10; i++){
seq.add(Integer.toString(i));
}
System.out.println("sequence"+ seq);

Selector sl = seq.getSelector();
while (!sl.end()){

System.out.println("sequence"+ sl.current());
sl.next();

}



Expand Down

0 comments on commit 6512977

Please sign in to comment.