Constructor and Description |
---|
Combinations(Object[] inArray,
int m)
Create a Combination to enumerate through all subsets of the
supplied Object array, selecting m at a time.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasMoreElements() |
Object |
nextElement() |
public Combinations(Object[] inArray, int m)
inArray
- the group to choose fromm
- int the number to select in each choicepublic boolean hasMoreElements()
public Object nextElement()
Actually, an array of Objects is returned. The declaration must say just Object, because the Combinations class implements Enumeration, which declares that the nextElement() returns a plain Object. Users must cast the returned object to (Object[]).
Copyright © 2018. All Rights Reserved.