简体   繁体   中英

Calculating permutations using a Java annotation

I'm interested in calculating permutations for parameters for something like this:

public class Movie() {

   @Selection(minimum=1,maximum=10)
   public Integer setLength() {}

   @Selection(minimum=1.1,maximum=5.5)
   public Double setCost() {}

}

So I can write something like List getPermutations(); so that I could get a list of every movie possible. I'm interested in supporting multiple data types.

Can anyone point me in the correct direction to take on building the annotation and List getPermutations() method?

是Donald Knuth解决方案在C#中一个实现,可能很容易移植。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM