public static class TwoStepsGOV3Function.Builder<T> extends Object
TwoStepsGOV3Function.| Modifier and Type | Field and Description |
|---|---|
protected boolean |
built
Whether
build() has already been called. |
protected ChunkedHashStore<T> |
chunkedHashStore |
protected Iterable<? extends T> |
keys |
protected File |
tempDir |
protected TransformationStrategy<? super T> |
transform |
protected LongBigList |
values |
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
TwoStepsGOV3Function<T> |
build()
Builds a new function.
|
TwoStepsGOV3Function.Builder<T> |
keys(Iterable<? extends T> keys)
Specifies the keys of the function; if you have specified a
ChunkedHashStore, it can be null. |
TwoStepsGOV3Function.Builder<T> |
store(ChunkedHashStore<T> chunkedHashStore)
Specifies a chunked hash store containing the keys associated with their rank.
|
TwoStepsGOV3Function.Builder<T> |
tempDir(File tempDir)
Specifies a temporary directory for the
ChunkedHashStore. |
TwoStepsGOV3Function.Builder<T> |
transform(TransformationStrategy<? super T> transform)
Specifies the transformation strategy for the keys of the function.
|
TwoStepsGOV3Function.Builder<T> |
values(LongBigList values)
Specifies the values assigned to the keys; the output width of the function will
be the minimum width needed to represent all values.
|
protected TransformationStrategy<? super T> transform
protected File tempDir
protected ChunkedHashStore<T> chunkedHashStore
protected LongBigList values
protected boolean built
build() has already been called.public TwoStepsGOV3Function.Builder<T> keys(Iterable<? extends T> keys)
ChunkedHashStore, it can be null.keys - the keys of the function.public TwoStepsGOV3Function.Builder<T> transform(TransformationStrategy<? super T> transform)
transform - a transformation strategy for the keys of the function.public TwoStepsGOV3Function.Builder<T> tempDir(File tempDir)
ChunkedHashStore.tempDir - a temporary directory for the ChunkedHashStore files, or null for the standard temporary directory.public TwoStepsGOV3Function.Builder<T> store(ChunkedHashStore<T> chunkedHashStore)
Warning: during the construction phase, a filter
will be set on the specified ChunkedHashStore. You will have to reset it to its previous state.
chunkedHashStore - a chunked hash store containing the keys associated with their rank, or null; the store
can be unchecked, but in this case you must specify keys and a transform
(otherwise, in case of a hash collision in the store an IllegalStateException will be thrown).public TwoStepsGOV3Function.Builder<T> values(LongBigList values)
values - values to be assigned to each element, in the same order of the keys.public TwoStepsGOV3Function<T> build() throws IOException
GOV3Function instance with the specified parameters.IllegalStateException - if called more than once.IOException