public final class TupleSequence
extends java.lang.Object
To make a new sequence requires choosing an operation, choosing a value (really, a previously-created sequence and one of its outputs) for each of the operation's inputs, and then concatenating all the input sequences along with the new operation. Most operations take a well-defined number and type of inputs. This helper class supports calling operations that take a variable number of inputs -- namely, array and list creation.
Ordinarily:
Modifier and Type | Field and Description |
---|---|
private java.util.List<java.lang.Integer> |
outputIndices
The list of statement indices that define outputs of this sequence.
|
Sequence |
sequence
The underlying sequence.
|
Constructor and Description |
---|
TupleSequence(java.util.List<Sequence> sequences,
java.util.List<java.lang.Integer> variables)
Create a TupleSequence that concatenates the given sequences, choosing the given variable from
each.
|
Modifier and Type | Method and Description |
---|---|
static TupleSequence |
createElementsSequence(SimpleList<Sequence> candidates,
int length,
Type elementType)
Selects sequences as element values for creating a collection.
|
java.util.List<java.lang.Integer> |
getOutputIndices()
Returns the list of output indices.
|
public Sequence sequence
private java.util.List<java.lang.Integer> outputIndices
public TupleSequence(java.util.List<Sequence> sequences, java.util.List<java.lang.Integer> variables)
sequences
- that will be concatenated to make the new TupleSequencevariables
- one index per sequence in sequences
, defining the outputs of the
TupleSequencepublic java.util.List<java.lang.Integer> getOutputIndices()
public static TupleSequence createElementsSequence(SimpleList<Sequence> candidates, int length, Type elementType)
candidates
- the sequences from which to selectlength
- the number of values to selectelementType
- the type of elements