Package org.apache.beam.sdk.values
Class PCollectionViews.SingletonViewFn2<T>
java.lang.Object
org.apache.beam.sdk.transforms.ViewFn<Materializations.IterableView<T>,T>
 
org.apache.beam.sdk.values.PCollectionViews.SingletonViewFn2<T>
- All Implemented Interfaces:
 Serializable,PCollectionViews.HasDefaultValue<T>,PCollectionViews.IsSingletonView<T>
- Enclosing class:
 PCollectionViews
@Internal
public static class PCollectionViews.SingletonViewFn2<T>
extends ViewFn<Materializations.IterableView<T>,T>
implements PCollectionViews.HasDefaultValue<T>, PCollectionViews.IsSingletonView<T> 
Implementation which is able to adapt an iterable materialization to a 
T.
 For internal use only.
PCollectionViews.SingletonViewFn is meant to be removed in the future and replaced with this class.
- See Also:
 
- 
Method Summary
Modifier and TypeMethodDescriptionapply(Materializations.IterableView<T> primitiveViewT) A function to adapt a primitive view type to a desired view type.Returns the default value that was specified.Gets the materialization of thisViewFn.Return theTypeDescriptordescribing the output of this fn.booleanReturns if a default value was specified. 
- 
Method Details
- 
hasDefault
Returns if a default value was specified. - 
getDefaultValue
Returns the default value that was specified.For internal use only.
- Specified by:
 getDefaultValuein interfacePCollectionViews.HasDefaultValue<T>- Throws:
 NoSuchElementException- if no default was specified.
 - 
getMaterialization
Description copied from class:ViewFnGets the materialization of thisViewFn.- Specified by:
 getMaterializationin classViewFn<Materializations.IterableView<T>,T> 
 - 
apply
Description copied from class:ViewFnA function to adapt a primitive view type to a desired view type.- Specified by:
 applyin classViewFn<Materializations.IterableView<T>,T> 
 - 
getTypeDescriptor
Description copied from class:ViewFnReturn theTypeDescriptordescribing the output of this fn.- Specified by:
 getTypeDescriptorin classViewFn<Materializations.IterableView<T>,T> 
 
 -