C
Collins
Hello All-
In the past I have used java pre generics for some programs related
to my hobbies. I have come back to it after a couple of years and am
biting the bullet and moving to 1.5(5.0)...
In the past I have made some type specific packages to generate some
basic combinatoric structures (permutations, combinations, partitions)
For my own use and education, I'm trying to figure out how to make this
more usfully with generics.
Specifically:
class foo {...}
class otherClass{
HashSet<foo> fooSet;
// now comes the tricky (to me) part
Iterator<???> perm = new permutation(fooSet);
/*
I'd like to have iterator return one permuation of the elements in
fooSet at a time
*/
}
So... Does this type of thing already exist somewhere? If so where?
If not how do I go about using generics to do such a thing?
Thanks in advance
Collins
In the past I have used java pre generics for some programs related
to my hobbies. I have come back to it after a couple of years and am
biting the bullet and moving to 1.5(5.0)...
In the past I have made some type specific packages to generate some
basic combinatoric structures (permutations, combinations, partitions)
For my own use and education, I'm trying to figure out how to make this
more usfully with generics.
Specifically:
class foo {...}
class otherClass{
HashSet<foo> fooSet;
// now comes the tricky (to me) part
Iterator<???> perm = new permutation(fooSet);
/*
I'd like to have iterator return one permuation of the elements in
fooSet at a time
*/
}
So... Does this type of thing already exist somewhere? If so where?
If not how do I go about using generics to do such a thing?
Thanks in advance
Collins