Class RDBERule.Combinations
- java.lang.Object
-
- org.openscience.cdk.formula.rules.RDBERule.Combinations
-
-
Constructor Summary
Constructors Constructor Description Combinations(Object[] inArray, int m)
Create a Combination to enumerate through all subsets of the supplied Object array, selecting m at a time.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasMoreElements()
Object
nextElement()
-
-
-
Constructor Detail
-
Combinations
public Combinations(Object[] inArray, int m)
Create a Combination to enumerate through all subsets of the supplied Object array, selecting m at a time.- Parameters:
inArray
- the group to choose fromm
- int the number to select in each choice
-
-
Method Detail
-
hasMoreElements
public boolean hasMoreElements()
- Returns:
- true, unless we have already returned the last combination.
-
nextElement
public Object nextElement()
- Returns:
- java.lang.Object, the next combination from the supplied Object array.
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[]).
-
-