简体   繁体   English

使用Java批注计算置换

[英]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(); 所以我可以写类似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? 谁能指出正确的方向来构建注释和List getPermutations()方法?

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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