com.espertech.esper.collection.CombinationEnumeration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of esper Show documentation
Show all versions of esper Show documentation
Complex event processing and event series analysis component
/*
***************************************************************************************
* Copyright (C) 2006 EsperTech, Inc. All rights reserved. *
* http://www.espertech.com/esper *
* http://www.espertech.com *
* ---------------------------------------------------------------------------------- *
* The software in this package is published under the terms of the GPL license *
* a copy of which has been included with this distribution in the license.txt file. *
***************************************************************************************
*/
package com.espertech.esper.collection;
import java.util.Enumeration;
import java.util.NoSuchElementException;
/**
* Provided a 2-dimensional array of values, provide all possible combinations:
*
* For example, an array { {1}, {"A", "B"}, {"X", "Y"} } provides these combinations:
* 1 A X
* 1 A Y
* 1 B X
* 1 B Y
*
.
* Usage Note: Do not hold on to the returned object array as {@link #nextElement()} returns the same array
* with changed values for each enumeration.
*
* Each array element must be non-null and length 1 or more.
*
*
* Does not detect duplicates in values.
*
*
* Allows any number for the first dimension.
*
*
* The algorithm adds 1 to the right and overflows until done.
*
*/
public class CombinationEnumeration implements Enumeration
© 2015 - 2025 Weber Informatics LLC | Privacy Policy