T - public class ConstantValue<T> extends AbstractStringify implements FlSequence<T>
LAMBDA_SEED_HINTL_NEGATIVE_INDICES, L_UNBOUNDED, NEGATIVE_INDICES, UNBOUNDED| Constructor and Description |
|---|
ConstantValue(T value) |
| Modifier and Type | Method and Description |
|---|---|
static <T> FlTemplate<T> |
constant(Supplier<? extends T> valueSupplier) |
static <T> ConstantValue<T> |
constant(T value)
Creates an unbounded sequence of only one value.
|
Class<T> |
getValueType()
Returns the type of values produced/contained by this instance.
|
long |
length()
Number of elements that can be accessed through
Sequence.value(long);
negative if sequence is unbounded or allows negative indices. |
FlGenerator<T> |
newGenerator()
Creates a generator.
|
static <T> ConstantValue<T> |
nullValues()
Returns an unbounded sequence of
null values |
FlTemplate<T> |
random(Distribution distribution,
long seed) |
long |
randomSeedHint() |
FlTemplate<T> |
shuffle() |
FlTemplate<T> |
shuffle(long seed) |
StringBuilder |
toString(StringBuilder sb) |
T |
value(long n)
Returns the nth element.
|
toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitalternateWith, first, fluentData, map, map, peek, random, random, random, repeat, sorted, split, split, stream, then, withaggregate, aggregate, alternateWith, distinct, few, filter, first, first, flatMap, many, map, mixWith, several, snapshot, some, then, toGenerator, transform, withall, cached, fetch, one, three, transformSource, twotoGenerators, toGeneratorsisInRange, isUnbounded, min, negativeIndices, toLongpublic ConstantValue(T value)
public static <T> ConstantValue<T> constant(T value)
T - value - public static <T> FlTemplate<T> constant(Supplier<? extends T> valueSupplier)
public static <T> ConstantValue<T> nullValues()
null valuesT - null valuespublic Class<T> getValueType()
Typednull if the type is unknown;
should never return a primitive type.getValueType in interface FlDataSource<T>getValueType in interface FlSequence<T>getValueType in interface FlTemplate<T>getValueType in interface Typed<T>public long length()
SequenceLengthSequence.value(long);
negative if sequence is unbounded or allows negative indices.length in interface SequenceLengthpublic FlGenerator<T> newGenerator()
TemplatenewGenerator in interface FlSequence<T>newGenerator in interface FlTemplate<T>newGenerator in interface Sequence<T>newGenerator in interface Template<T>public FlTemplate<T> random(Distribution distribution, long seed)
random in interface FlSequence<T>public FlTemplate<T> shuffle(long seed)
shuffle in interface FlDataSource<T>shuffle in interface FlTemplate<T>public FlTemplate<T> shuffle()
shuffle in interface FlDataSource<T>shuffle in interface FlSequence<T>shuffle in interface FlTemplate<T>public long randomSeedHint()
randomSeedHint in interface FlSequence<T>public StringBuilder toString(StringBuilder sb)
Copyright © 2019. All rights reserved.