Do something like:

public Iterator<MyMove> iterator() {
    return new Iterator<MyMove>() {
          public MyMove next() {
                Cloud a = ...; // random entity
                Process b = ...; // random value
                return new MyMove(a, b);
          }
    };

}

Op 12-12-12 13:36, 软件0907黄泓 schreef:
Hi,
I have to implement this interface to meet requirement on performance and to use Random and JUST_IN_TIME configuration in xml. However, all examples provided implement MoveListFactory instead of this interface,and I don't quite understand how to implement the MoveIteratorFactory interface. The reference mannual told me not to create a collection of moves when creating the Iterator<Move>. I don't understand what this means,and how to use the arguments ScoreDirector and Random for each method. How can you get an iterator of moves if you do not make a collection of moves?And I don't quite understand  what the reference mannual means by saying "this interface gives you the ability to create a move just in time in the iterator's method next()".Does this mean I only have to provide a collection with only one move that was randomly chosen?Could you provide me an example on how to implement this interface on the curriculumcourse example?
with kind regards


_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users