Class GSequencesGenerator<TCodedGenerator extends GCodedSequencesGenerator,TItem>
java.lang.Object
com.glitchybyte.glib.combinatorics.GSequencesGenerator<TCodedGenerator,TItem>
- Type Parameters:
TCodedGenerator- Type of coded sequences generator.TItem- Type of item.
- Direct Known Subclasses:
GCombinations,GPermutations
public abstract class GSequencesGenerator<TCodedGenerator extends GCodedSequencesGenerator,TItem>
extends Object
implements Iterable<List<TItem>>
Abstract sequences generator.
-
Constructor Summary
ConstructorsConstructorDescriptionGSequencesGenerator(TCodedGenerator codedGenerator, TItem[] items) Creates a sequences generator with the given characteristics. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
GSequencesGenerator
Creates a sequences generator with the given characteristics.- Parameters:
codedGenerator- Coded sequence generator for the type of sequences we want to generate.items- Items for the generator.
-
-
Method Details
-
iterator
Returns an iterator over elements of typeTItem.- Specified by:
iteratorin interfaceIterable<TCodedGenerator extends GCodedSequencesGenerator>- Returns:
- an Iterator.
-