@Experimental(value=CORE_RUNNERS_ONLY) @Internal public static class PCollectionViews.SingletonViewFn2<T> extends ViewFn<Materializations.IterableView<T>,T> implements PCollectionViews.HasDefaultValue<T>
T.
For internal use only.
PCollectionViews.SingletonViewFn is meant to be removed in the future and replaced with this class.
| Modifier and Type | Method and Description |
|---|---|
T |
apply(Materializations.IterableView<T> primitiveViewT)
A function to adapt a primitive view type to a desired view type.
|
T |
getDefaultValue()
Returns the default value that was specified.
|
Materialization<Materializations.IterableView<T>> |
getMaterialization()
Gets the materialization of this
ViewFn. |
TypeDescriptor<T> |
getTypeDescriptor()
Return the
TypeDescriptor describing the output of this fn. |
boolean |
hasDefault()
Returns if a default value was specified.
|
@Internal public boolean hasDefault()
public T getDefaultValue()
For internal use only.
getDefaultValue in interface PCollectionViews.HasDefaultValue<T>java.util.NoSuchElementException - if no default was specified.public Materialization<Materializations.IterableView<T>> getMaterialization()
ViewFnViewFn.getMaterialization in class ViewFn<Materializations.IterableView<T>,T>public T apply(Materializations.IterableView<T> primitiveViewT)
ViewFnapply in class ViewFn<Materializations.IterableView<T>,T>public TypeDescriptor<T> getTypeDescriptor()
ViewFnTypeDescriptor describing the output of this fn.getTypeDescriptor in class ViewFn<Materializations.IterableView<T>,T>